2014-01-20 80 views

回答

4

你會使用Web.config配置訪問:

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

如何創建角色並檢查用戶在角色? – coto2

相關問題