One of the window verification methods, Forms Verification

Source: Internet
Author: User

Sometimes we do some systems that require identity verification. We refuse to use session for judgment on every page. At this time, we can set the authentication method for logging on to the website in the configuration file. forms authentication is fine,

Forms authentication: when a user logs on to the system, the system wants the server to send a request. The server request does not contain valid authentication cookies, and the web service points the page to a specific page.

Configuration file configuration example:

<System. web>

<Authentication mode = "Forms"> <! -- Authentication step 1: Set it to forms authentication --> mode. You can also select other authentication methods, as well as windows and passport.
<Forms loginUrl = "productManage. aspx" timeout = "2880"/> <! -- Page not pointed to when identity authentication fails -->
</Authentication>

<Authorization> <! -- Step 2 of identity verification: Set To Deny Access From anonymous users -->
<Deny users = "? "/> You can also set here to allow those users to come in, for example: <allow/>
</Authorization>

</System. web>

 

You can try ......

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.