Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > 2.0 membership login feature, changing directories

Reply
Thread Tools

2.0 membership login feature, changing directories

 
 
Cindy Lee
Guest
Posts: n/a
 
      03-08-2006
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?


 
Reply With Quote
 
 
 
 
Cindy Lee
Guest
Posts: n/a
 
      03-08-2006
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?
>
>



 
Reply With Quote
 
 
 
 
Cindy Lee
Guest
Posts: n/a
 
      03-08-2006
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?
> >
> >

>
>



 
Reply With Quote
 
Cindy Lee
Guest
Posts: n/a
 
      03-09-2006
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?
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Directories and Physical directories Paul M Fin MCAD 4 06-27-2008 07:50 PM
virtual directories/physical directories in IIS Paul F ASP .Net 4 06-25-2008 04:04 PM
Multiple bin-directories with virtual directories? =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?= ASP .Net 0 11-09-2004 05:49 PM
How to map Project directories to Production sub-directories Joel Finkel ASP .Net 0 09-12-2003 06:47 PM
Using virtual directories for common directories (scripts, images, styles, etc.) Jeffry van de Vuurst ASP .Net 2 07-30-2003 07:00 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57