Forms authentication

B

Ben

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
 
J

Joseph Bittman MCAD

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
 
B

Ben

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
 
P

Patrick Olurotimi Ige

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
 
B

Ben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top