Ask a Question related to ASP.NET Security, Design and Development.
-
R-D-C #1
Basic Forms Authentication question
I can't get this damn thing to work at all.
I have a virtual directory set up with anonymous access only, web.config
contains the following but when I go to the site it ignores the security and
never redirects to login.aspx. I know this will be a stupid problem but
please help!
<configuration>
<system.web>
<authentication mode="Forms">
<forms name="ASPXAUTH"
loginUrl="login.aspx"
protection="All"
path="/"/>
</authentication>
</system.web>
</configuration>
R-D-C Guest
-
Basic Forms Authentication Expiration ?
Yes. When the user is authenticated with FormsAuthentcation.RedirectFromLoginPage or with FormsAuthentication.SetAuthCookie, pass false to the... -
Forms Authentication via SSL question
I have an ASP.NET application using forms authentication. I works without any problems. I have been trying to enable the login process to work... -
Problems when authenticating against the Active Directory using Forms Authentication and Visual Basic .NET
I have recently followed the document to allow authentication against Active Directory using Forms authentication as described in the the Microsoft... -
Can I pass ASP Basic Auth Credentials to an APS.NET Forms Authentication site?
I am converting an ASP Website running Windows NT 4.0 to ASP.NET running Windows 2000 on a different computer across the Internet. During this... -
ASP.Net Forms authentication with basic authentication popup
Relatively new to ASP.Net but have a strange problem. My site uses forms authentication for a large administration section however after the user... -
Michal A. Valasek #2
Re: Basic Forms Authentication question
| I have a virtual directory set up with anonymous access only, web.config
| contains the following but when I go to the site it ignores the security
and
| never redirects to login.aspx. I know this will be a stupid problem but
| please help!
you must specify not only authentication, but also the authorization
conditions. The following web.config example should help:
<configuration>
<system.web>
<!-- here you would setup authentication method -->
<authentication mode="Forms">
<forms loginUrl="/Default.aspx" timeout="30" path="/" protection="All"
/>
</authentication>
<!--
now specify authorization for root folder
'*' means all users, '?' means anonymous users
the following setting will allow access to all users except anonymous
-->
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
<!--
here we specify different rights for the 'noauth' folder, where
everyone
(even anonymous users) has access
-->
<location path="noauth">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<!--
here we specify different rights for the 'admin' folder, where only
members of 'Admins' role can go
-->
<location path="admin">
<system.web>
<authorization>
<allow roles="Admins" />
<deny users="*" />
</authorization>
</system.web>
</location>
</configuration>
--
Michal A. Valasek, Altair Communications, [url]http://www.altaircom.net[/url]
Please do not reply to this e-mail, for contact see [url]http://www.rider.cz[/url]
Michal A. Valasek Guest



Reply With Quote

