how to restric user of Certain role from certain page in Asp.net C# -


i using built-in asp.net roles , membership provider in website.

what want restrict user in role "nurse" page name

doctordiscussionboard.aspx.

help me how it.

i guess write code in page load method.

you can suggest:

if (user.isinrole("nurse"))     //redirect 

that method in system.security.principal namespace.

you can in web.config:

<configuration>   <location path="doctordiscussionboard.aspx">     <system.web>       <authorization>         <deny roles="nurses" />         <allow roles="doctors" />         <deny users="*" />       </authorization>     </system.web>   </location> .... 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -