Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi, I have build a site that relies on forms authentication and this is how my web.config looks like:

 

	<system.web>
   <customErrors mode="Off"></customErrors>
   <authentication mode="Forms">
     <forms name ="hosteseAuth" path="/" loginUrl="login.aspx" protection="All" timeout="30">
       <credentials passwordFormat="Clear">
         <user name="jeff" password="test" />
         <user name="mike" password="test" />
       </credentials>
     </forms>
   </authentication>
   <authorization>
     <deny users="?" />
   </authorization>

 

it all works just fine, but I don't understand where do I specify what pages of my site I want to require to login. Example: I want to specify that default.aspx and every other page can be viewed by anyone, only the admin.aspx site requires login.

With the code above, login is requiered when I try to get on any page, even default.aspx.

 

I've searched the forum, and haven't found any example that would help me. Is implementing roles the key? How do I do that?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...