locked
allow user to access website's specific page RRS feed

  • Question

  • User1313904611 posted

    hi,

    I have a admin section in website where there is a  login user - admin

    Admin  allow to access all the pages of admin section.

    I want to create a new users and they should be able to do  changes from the admin site, but we want to ensure they do not have access to other admin options.

    Monday, June 30, 2014 4:30 AM

Answers

  • User-1360095595 posted

    Authorization. You can create different roles with different access priviledges; or use user based access permissons.

    Refer: http://msdn.microsoft.com/en-us/library/wce3kxhd(v=vs.100).aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 30, 2014 5:25 AM
  • User-1818759697 posted

    Hi,

    For this situation, you could try to add the configuration markup to Web.config:

    <configuration>    
         <system.web>    
              <authorization>    
                   <allow roles="Administrators" />    
                   <deny users="*"/>    
              </authorization>    
    
         </system.web>
    
         <!-- Allow all users to visit RoleBasedAuthorization.aspx -->    
         <location path="RoleBasedAuthorization.aspx">    
              <system.web>    
                   <authorization>    
                        <allow users="*" />    
                   </authorization>    
              </system.web>    
         </location>    
    </configuration>

    For detailed information, you could refer to:

    http://www.asp.net/web-forms/tutorials/security/roles/role-based-authorization-cs

    Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 1, 2014 1:37 AM

All replies

  • User-1360095595 posted

    Authorization. You can create different roles with different access priviledges; or use user based access permissons.

    Refer: http://msdn.microsoft.com/en-us/library/wce3kxhd(v=vs.100).aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 30, 2014 5:25 AM
  • User-1818759697 posted

    Hi,

    For this situation, you could try to add the configuration markup to Web.config:

    <configuration>    
         <system.web>    
              <authorization>    
                   <allow roles="Administrators" />    
                   <deny users="*"/>    
              </authorization>    
    
         </system.web>
    
         <!-- Allow all users to visit RoleBasedAuthorization.aspx -->    
         <location path="RoleBasedAuthorization.aspx">    
              <system.web>    
                   <authorization>    
                        <allow users="*" />    
                   </authorization>    
              </system.web>    
         </location>    
    </configuration>

    For detailed information, you could refer to:

    http://www.asp.net/web-forms/tutorials/security/roles/role-based-authorization-cs

    Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 1, 2014 1:37 AM