Groups | Blog | Home
all groups > asp.net security > july 2005 >

asp.net security : Forms authentication


Ben
7/7/2005 2:56:01 PM
Hi,

I am currently developing a web site that will use "Forms" authentication. I
am having an issue in which the "Forms" authetication works only one time.
Any other session after that are redirected to the web forms that require
authentication, which results in an error, because the page is expecting the
user to be logged in.

Here are my web.config settings:

<authentication mode="Forms">
<forms name="appNameAuth" path="/" loginUrl="Login.aspx" protection="All"
timeout="60"/>
</authentication>

(Page that requires authentication)
<location path="~/AuthReq/Address.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>

Thanks for your help

Ben
Joseph Bittman MCAD
7/13/2005 11:51:51 AM
July 13, 2005

I think you are wanting to persist authentication across Multiple
browser sessions? And your custom auth code is expecting the user to still
be auth? That isn't a good practice to assume something, but I think you are
wanting a way to persist auth..... in your forms code I think you are using
something like:

formsauthentication.redirectfromlogonpage("USERNAME",BOOLEAN)

The BOOLEAN variable specifies whether to persist the auth cookie across
Multiple browser sessions, which is what I think you want.... HTH :-)

--
Joseph Bittman
Microsoft Certified Application Developer

Web Site: http://71.39.42.23
Static IP




[quoted text, click to view]

Ben
7/15/2005 1:55:04 PM
Hi Joseph,

Thanks for your reply.

No, I am not trying to persist authentication across multiple browser
sessions. The authentication page (login.aspx) is not coming up at all.

When I get to a web form that requires authentication, ASP.NET does not
redirect the user to the Login web form, instead the page executes the code
in the page load event.

I have tried changing the directory security settings, but no luck. I have
Anonymous access and Integrated Windows authentication check boxes selected.

Thanks for your help

Ben

[quoted text, click to view]
Patrick Olurotimi Ige
7/19/2005 9:12:22 PM
Ben if you are using Forms Auth why are u having Anonymous Access and
Windows Integrated Auth checked?
And another thing is are u sure cookies are enabled?
Patrick





Ben
7/20/2005 6:47:06 PM
Patrick,

Since I am in development mode I need Windows Integrated Auth. I unchecked
Anonymous access and it works now!

Thanks for your help!

Ben

[quoted text, click to view]
AddThis Social Bookmark Button