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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -