Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

The solution is to implement your own HTTP Module and determine the allow / deny security based upon the roles attribute in the Web.sitemap file. This works in conjunction with ASP.NET 2.0's built-in security.

 

 

 

Add the following code to your web.config file inside the <system.web> node. This will allow you to intercept requests to all pages before processing, allowing you to force the Web.sitemap security.

 

<httpModules> <add name="SecurityHttpModule" type="Joel.Net.SecurityHttpModule" /></httpModules>

 

 

Here's the code that performs all the magic... View Source Code

 

 

Moe Tarhini

 

Senior Software Engineer

 

http://profoundway.blogspot.com

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...