In web.config, how to specify a page that can be accessed without login?

T

Teemu Keiski

In the current web.config (that has this <authentication> setting) you
probably have authorization set as:

<authorization>
<deny users="?" />
</authorization>

that would impact all pages in the application by default.

Now to the answer, you can specify different <authorization> for a specific
page or subfolder by using <location> tag. Set this <location> element
outside the <system.web> tags in current web.config, but of course inside
<configuration> elements.

<location path="contactUS.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

Now remembering the setting in generally to deby unauthorized users,
unauthorized users can now access login.aspx and contactUS.aspx pages in
your application.

--
Teemu Keiski
MCP, Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

AspInsiders Member, www.aspinsiders.com
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com
 

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,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top