ASP. NET identity 2.2.0 role enablement and basic use under WebForm (iv)

Source: Internet
Author: User

There are netizens asked the question of authority, in fact, I think there is no improvement.

The Web. config under the home directory is basically not changed. If you want to change it, only the database is connected.

<authentication mode= "None"/>
<compilation debug= "true" targetframework= "4.5.2"/>

These two I did not change, supposedly <authentication mode= "None"/> should be changed to <authentication mode= "Forms"/> But I used to change and not change no difference.

Moreover, when the project was established, you should have chosen, the project template production when this is not moving. I personally think this is a decoration.

Other WebForm use directory permissions, so the rest is to set the directory's access permissions in each directory (the directory has a Web. config file). To tell the truth, this is all very basic knowledge.

This is the content of Web. config under my Admin folder

<?xml version="1.0"?><configuration>  <location path="  ~/account/login.aspx">    <system.web>      <authorization>        <allow roles = " Admin "/>//Allow Admin role access only        <deny users ="*"/>      //Deny all users      </authorization>    </system.web>  </location></configuration>

All other directories can be set according to your permission schema.

ASP. NET identity 2.2.0 role enablement and basic use under WebForm (iv)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.