How to specify the pages I do not want authentication

Last post 11-09-2007 11:05 AM by PJonDevelopment. 2 replies.

Sort Posts:

  • How to specify the pages I do not want authentication

    11-09-2007, 8:53 AM
    • Member
      24 point Member
    • PJonDevelopment
    • Member since 11-06-2007, 8:20 PM
    • Rio de Janeiro
    • Posts 20

    HI,

     I'm working with a system that requires authentication. The authentication is made against the AD and it's working fine.

    However, ONE of the pages (not the login page) does not require authentication.

    The IIS is set to allow Anonymous Users, and the Web.config is set as below:

    <authentication mode="Forms">
       <
    forms loginUrl="login.aspx" name="MyApplication" path="/" />
    </
    authentication>

    <
    identity impersonate="true" />

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

    My problem is that a page called "noAccess.aspx" does not require authentication.

    How do I set this up?

    Regards,

    Paulo Santos
    http://pjondevelopment.50webs.com

     

  • Re: How to specify the pages I do not want authentication

    11-09-2007, 9:04 AM
    Answer
    • All-Star
      86,764 point All-Star
    • ecbruck
    • Member since 12-30-2005, 7:39 PM
    • Des Moines, IA
    • Posts 9,209
    • Moderator

    Add a location element specifically for this page like so: 

    <location path="noAccess.aspx">
    	<system.web>
    		<authorization>
    			<allow users="*" />
    		</authorization>
    	</system.web>
    </location>
    Thanks, Ed

    Microsoft MVP - ASP/ASP.NET

  • Re: How to specify the pages I do not want authentication

    11-09-2007, 11:05 AM
    • Member
      24 point Member
    • PJonDevelopment
    • Member since 11-06-2007, 8:20 PM
    • Rio de Janeiro
    • Posts 20

    Thanks

     It worked. :-)

Page 1 of 1 (3 items)