Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I exclude a page from being authenticated?

Status
Not open for further replies.

ceyhorn

Programmer
Nov 20, 2003
93
US
I have a new user registration page, but whenever a new user clicks it from the login page, it just redirects to the login page. How do I exclude it from being part of the authentication process? I am using visual studio 2002, building a solution project.
Thanks in advance for help,
Chris
 
You can have multiple Web.Config files for different folders that override the parent's (they will adopt the attributes of the nearest parent Web.Config unless a more local version is present).

Alternately, you can use a "location" element within your web.config file:

Code:
<configuration>

...

<location path="ShowUser.aspx">
  <system.web>
    <authorization>
      <allow users ="?" />
    </authorization>
  </system.web>
</location>

</configuration>
 
So I would just set the location path to my new user registration page and allow all users?

thanks again,

Chris
 
Pretty much.

The location "path" would be set to your registration page and <allow users ="?" /> would, indeed, allow anonymous users (those who aren't logged on). The location element shouldn't interfere with the other pages' forms authentication requirement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top