Forms Authentication: <location> authorization not bypasssing login page.

M

M Gallagher

I am trying to configure my forms authentication so a certain page is not
subject to a redirect to the login page. This seems like it should be a
simple thing to do with a <location> tag, but its just not working. Requets
to the page (public.aspx) specified in the <location> tag are still being
redirected to the login page. The login page is in a subdirectory of the
application root where web.config resides. Here is the code from the
web.config file. Anyone know what Im doing wrong and why I cant grant
access to that one page without hitting the login page?

<configuration>

<system.web>

<authentication mode="Forms">

<forms loginUrl="logon/logon.aspx" timeout="120"/>

</authentication>

<authorization>

<allow roles="MyUsers"/>

<deny users="*"/>

</authorization>

</system.web>

<location path="logon">

<system.web>

<authorization>

<allow users="*"/>

</authorization>

</system.web>

</location>

<location path="public.aspx">

<system.web>

<authorization>

<allow users="*"/>

</authorization>

</system.web>

</location>
 
J

Joe

Here's a location tag the way I have it setup to avoid the authentication:

<location path="quickpage.aspx">
<system.web>
<compilation defaultLanguage="c#" debug="true" />
<customErrors mode="Off" />
<authorization>
<allow users ="*"/>
</authorization>
</system.web>
</location>
 

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,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top