Forms Authentication not Redirecting

J

Jeremy

I have a web app that contains forms authentication to protect
subdirectory called "admin" by denying anonymous users. When I request
a protected resource in the admin directory I am presented with a
Windows logon dialog prompt instead of being redirected to the logon
page. In the web.config it is setup as follows:

<configuration>
<system.web>
....
<authentication mode="Forms">
<forms
name="myCookie"
protection="All"
path="/"
loginUrl="login.aspx"
timeout="10" >
</forms>
</authentication>
....
<system.web>

<location path="admin">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>

<configuration>

If I change the <deny users="?"/> to <allow users="?"/> the Windows
logon prompt goes away, but of course the resource us unprotected and
it does not redirect to the login.aspx page. Its behaving as though I
am using Windows authentication. Any ideas why is the Windows logon
prompt is being displayed rather than simply redirecting to the
login.aspx page?
 
J

Jon

I have a web app that contains forms authentication to protect
subdirectory called "admin" by denying anonymous users. When I request
a protected resource in the admin directory I am presented with a
Windows logon dialog prompt instead of being redirected to the logon
page. In the web.config it is setup as follows:

<configuration>
<system.web>
...
<authentication mode="Forms">
<forms
name="myCookie"
protection="All"
path="/"
loginUrl="login.aspx"
timeout="10" >
</forms>
</authentication>
...
<system.web>

<location path="admin">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>

<configuration>

If I change the <deny users="?"/> to <allow users="?"/> the Windows
logon prompt goes away, but of course the resource us unprotected and
it does not redirect to the login.aspx page. Its behaving as though I
am using Windows authentication. Any ideas why is the Windows logon
prompt is being displayed rather than simply redirecting to the
login.aspx page?

Hello mate,

Have a look at IIS in the security tab, as it could be due to that.
Also, search for impersonate in google. I had this problem once as it
was that.

HTH,

Jon

www.nantwichonline.com/pubs.aspx
All things Nantwich
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top