Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

asp.net and forms authentication

0 views
Skip to first unread message

none

unread,
Nov 13, 2001, 11:14:11 AM11/13/01
to
I want to simply secure a subdirectory with a form login page. I have all
my usernames and passwords stored in a sql database. I have yet to find a
good example of how to setup the config.web to accomplish this (I assume
this is what i need to do). Does anyone know of an example that shows how
to accomplish this?

Thanks.

Jay Scarbrough


Radomir (MSFT)

unread,
Nov 13, 2001, 11:50:24 AM11/13/01
to
Hi Jay,

I hope the following link will be of help:

http://support.microsoft.com/support/kb/articles/q308/1/57.asp


This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.

Mike Carter

unread,
Nov 13, 2001, 3:07:48 PM11/13/01
to
http://support.microsoft.com/support/kb/articles/Q306/2/38.ASP
and several links off of that page for configuration in the web.config file,
etc.
-mike

<none> wrote in message news:#VEu13FbBHA.1360@tkmsftngp04...

Das

unread,
Nov 13, 2001, 3:53:33 PM11/13/01
to
To know about Validation, you must visit this.

<http://www.aspng.com/quickstart/aspplus/doc/webvalidation.aspx>

--Das.

<none> wrote in message news:#VEu13FbBHA.1360@tkmsftngp04...

Michael

unread,
Nov 13, 2001, 4:34:28 PM11/13/01
to
Is there any way to use different user/role sets for different directories
without creating a virtual directory? I tried to add <location path="MyDir">
in the web.config, but it requires a new virtual directory.

I need something like this:

MyWeb
default.aspx - everybody can access it
Directory1 - Jake and Robert can access
Directory2 - Erik and Jake can access


"Radomir (MSFT)" <radomir...@microsoft.com> wrote in message
news:WVfyhNG...@cppssbbsa01.microsoft.com...

Radomir (MSFT)

unread,
Nov 14, 2001, 9:13:27 AM11/14/01
to
Here's an example.. hope it helps.


<configuration>
<system.web>
<authentication mode="Forms" >
<forms loginUrl="login.aspx" name=".ASPNETAUTH" protection="None" path="/" timeout="20" >
</forms>
</authentication>
<!-- the following authorization section is for the all files in this application except for which you have not explicitly specified another setting. -->
<authorization>
<deny users="?" />
</authorization>
</system.web>
<!-- the following authorization section is for only default1.aspx page which resides in the same dir as that of this config file. -->
<location path="default1.aspx">
<system.web>
<authorization>
<allow users ="*" />
</authorization>
</system.web>
</location>
<!-- the following authorization section is for all the files that are in a subdirectory called "subdir1". They allow access to Jake and Robert and deny to
everyone else-->
<location path="subdir1">
<system.web>
<authorization>
<allow users ="Jake, Robert" />
<deny users ="*" />
</authorization>
</system.web>
</location>
</configuration>

Michael

unread,
Nov 14, 2001, 11:05:39 AM11/14/01
to
Thank you for the example. Yesterday, I tried to use locations, but I used
them with the <authentication> tag inside. In that case, ASP requires
virtual directories for every declared location. If there is not tag
authentication in the location everything works fine.

"Radomir (MSFT)" <radomir...@microsoft.com> wrote in message

news:ILxfhaR...@cppssbbsa01.microsoft.com...

0 new messages