ASP. NET iis7.x and Form Verification

Source: Internet
Author: User

IIS 7.x integrates ASP. net http MPs Queues with iis http MPs queues. Other Web services that can be configured for IIS 7.xProgramUse ASP. NET form verification, and these applications are not necessarily built through ASP. NET.

IIS 7.x saves most of the Web application configurations on the Web server to the Web. config file. That is to say, many web application options can be configured through the IIS 7.x Manager Console or directly modifying the Web. config file.Due to the close integration of ASP. NET configuration features and IIS 7.x, any direct modifications to the Web. config file will be immediately reflected in the management console, and vice versa.

The Configuration feature configuration form is verified through the IIS 7.x console:

After you enable form verification in this way, you must configure the expected verification rules. The most important thing is to add a "deny" rule for all anonymous users through the authorization Configuration feature of the IIS 7.x console:

Both configurations affect the Web. config file:

<?XML Version= "1.0" Encoding= "UTF-8"?>

 

 
<Configuration>

 
<System. Web>

<Authentication Mode= "Forms">

<Forms Loginurl= "Dblogin. aspx" Name= "Mycookiename" Timeout= "2" />

</Authentication>

</System. Web>

<System. Webserver>

<Security>

<Authorization>

<Add Accesstype= "Deny" Users= "? " />

</Authorization>

</Security>

</System. Webserver>

 
 

 
</Configuration>

As expected, IIS configures Form Verification in the <system. Web> section. However, no authorization rules are found by default. Not all configuration items are saved to the Web. config file by default. URL Authorization is one of these configurations.

 

When IIS 7.x is running in consolidation mode (default), IIS uses an HTTP processing pipeline to process both ASP-based.. Net and the native HTTP module of IIS 7.x. In other words, you can even use Form Verification for other types of applications, such as static html sites, traditional ASP applications, and PHP applications. All you have to do is configure the application as a virtual directory and configure form verification on the IIS 7.x console. This automatically adds a web. config configuration for the application.

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.