Well I guess no on answered by question. But i figured it out, and you use
the appliation name.
<membership defaultProvider="YourSqlProvider">
<providers>
<add connectionStringName="LocalSqlServer" applicationName="TestApp"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0" name="YourSqlProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers
From this article:
http://odetocode.com/Articles/427.aspx
Another important property to set in the membership configuration is the
applicationName property. The applicationName allows one database to support
multiple web applications. If you have two web applications and want both
apps to share the same user base, give both applications the same
applicationName and point them to the same aspnetdb database. If you want
both applications to use the same database but not share users, give each
application a unique applicationName property.
"Cindy Lee" <> wrote in message
news:%23SUP%...
> also, is it possible to have 2 applications using the same database for
> usernames and passwords?
>
> "Cindy Lee" <> wrote in message
> news:...
> > Oh, my config file is:
> >
> > <connectionStrings>
> > <remove name="LocalSqlServer"/>
> > <add name="LocalSqlServer" connectionString="Data
> > Source=SQLB1.webcontrolcenter.com;Initial Catalog=db;Persist Security
> > Info=True;User ID=xxx;Password=xxx"/>
> > <add name="Personal" connectionString="Data
> > Source=SQLB1.webcontrolcenter.com;Initial Catalog=db;Persist Security
> > Info=True;User ID=xxx;Password=xxx"
> > providerName="System.Data.SqlClient" />
> > <add name="loftladbConnectionString1" connectionString="Data
> > Source=SQLB1.webcontrolcenter.com;Initial Catalog=db;Persist Security
> > Info=True;User ID=xxx;Password=xxx"
> > providerName="System.Data.SqlClient" />
> > </connectionStrings>
> > <system.web>
> > <pages styleSheetTheme="White"/>
> > <customErrors mode="Off"/>
> > <compilation debug="true"/>
> > <membership defaultProvider="YourSqlProvider">
> > <providers>
> > <add connectionStringName="LocalSqlServer"
> > minRequiredPasswordLength="6"
> > minRequiredNonalphanumericCharacters="0"
> name="YourSqlProvider"
> > type="System.Web.Security.SqlMembershipProvider" />
> > </providers>
> > </membership>
> > <authentication mode="Forms">
> > <forms loginUrl="default1.aspx" protection="Validation"
> timeout="300"
> > />
> > </authentication>
> > <authorization>
> > <allow users="*"/>
> > </authorization>
> > <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
> > <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider" />
> > <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
> > <providers>
> > <add name="XmlSiteMapProvider" description="SiteMap provider which
> reads
> > in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web,
> > Version=2.0.0.0, Culture=neutral, PublicKeyToken=xxxxx"
> > siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
> > </providers>
> > </siteMap>
> > </system.web>
> > <location path="Admin">
> > <system.web>
> > <authorization>
> > <allow roles="Administrators"/>
> > <deny users="*"/>
> > </authorization>
> > </system.web>
> > </location>
> > </configuration>
> >
> > "Cindy Lee" <> wrote in message
> > news:...
> > > I'm using vs 2005 and .net 2.0 with the new login feature. I'm
> deploying
> > to
> > > a remote website and using sql server 2005.
> > >
> > > I used aspnet_regsql to set this up on the remote sql server 2005
> > database.
> > >
> > > Everything works great when I deploy the website to the main directory
> of
> > my
> > > server. But I want to put it in a differenet directory, say 'lofts/'
> > > The web site loads up fine, but when I try to log in, it can't find my
> > > username/pasword and registration doesn't work.
> > >
> > > Is there something in my web.config file i need to change?
> > >
> > >
> >
> >
>
>