ASP.NET Authentication with Roles from External OBD



  • Good night. In the development of the web application ASP.NET WebForms of the customer to the OBDMS SQLIntroduce RoleMask for the lasers. Accordingly, there is a need to differentiate access to different forms in this way. RoleMask♪ I didn't work with the authentication, and the stupid idea of writing a laser in in a holding room and checking in every one of them. Page_Load, if the laser has a right. The lack of ideas is obvious. Coping the subject, stumbling. FormsAutheficationI think it's pretty good. Access built web.config Somehow:

    <location path="path"> 
       <system.web>
          <authorization> 
             <allow roles="role"/>
             <deny users="*"/>
          </authorization>
       </system.web>
    </location>
    

    How do you add your role? Roles.CreateRole (ProviderException - The role control function is not included).



  • Doing Page_Load - It's not a good idea. We need to turn on the role.
    You. http://msdn.microsoft.com/ru-ru/library/ms228053%28v=vs.100%29.aspx ♪ http://aspnet-web.ru/voprosy-bezopasnosti-aspnet-prilozhenij/ispolzovanie-instrumenta-aspnet-site-administration.html ♪
    For that, Меню Проект (I don't remember, if not there, look at the other menu points) Asp.Net - a panel of configuration of your application will open (also naturally, web.config shall be placed on the right OBD users.
    Users and roles and some other structures can be managed in this panel. We need to find some roles and just turn them on. You may also add/should play, make access to different directors of the application (may be hand-held as you described) etc. Each OBD setting needs to be produced separately (for test and work).
    The constructions are described for a standard user supplier and roles.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2