Summary of IIS deployment site experience and iis deployment experience

Source: Internet
Author: User

Summary of IIS deployment site experience and iis deployment experience

Summary of IIS deployment site experience

1. Install IIS and. net4.0 sequentially. Install. net framework 4.0 before IIS. If you install IIS in reverse order, you can only run the following command to enable it:

C: \ Windows \ system32> C: \ WINDOWS \ Microsoft. NET \ Framework \ v4.0.30319 \ aspnet_regii.exe-ir-enable

2. the application pool ID of IIS includes "ApplicatonPoolIdentity", "LocalSystem", "Local Service", and "Network Service". By default, "ApplicatonPoolIdentity" is used ", if you are connected to a local database, you may not be connected due to security restrictions, change the Application ID to "LocalSystem" in the application pool advanced settings process model.

3. machineKey: It is configured with asp.net framework-level machine by default. config (C: \ Windows \ Microsoft. NET \ Framework64 \ v4.0.30319 \ Config), which is by default from. net framework is dynamically generated on different servers, but the cluster scenario must be the same. Otherwise, an error occurs during encryption and decryption:

4. Pay attention to the differences between the Classic mode and the integration mode of the IIS application pool. This should be analyzed based on specific scenarios.

 

Case 1: During Server Load balancer deployment, viewstate verification fails because the machineKey on multiple servers is different.

"/" Indicates a server error in the application.

 

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

See http://go.microsoft.com/fwlink? LinkID = 314055 for more information.

Note: unprocessed exceptions occur during the execution of the current Web request. Check the stack trace information for details about the error and the source of the error in the code.

Exception details: System. web. httpException: Validation of viewstate MAC failed. if this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. autoGenerate cannot be used in a cluster.

See http://go.microsoft.com/fwlink? LinkID = 314055 for more information.

Source error:

[No relevant source line]


Source File: c: \ Windows \ Microsoft. NET \ Framework64 \ v4.0.30319 \ Temporary ASP. NET Files \ root \ a59f6e56 \ mongod1464 \ App_Web_uydhjhqj.5.cs row: 0

Stack trace:

 

Case 2: The application pool ID is improperly set, and the. \ sqlexpress instance on the machine cannot be connected.

The requested Database "wygl" cannot be opened ". Logon Failed.
User 'iis APPPOOL \ ielong 'Login Failed.

Note: unprocessed exceptions occur during the execution of the current Web request. Check the stack trace information for details about the error and the source of the error in the code.

Exception details: System. Data. SqlClient. SqlException: the requested Database "wygl" cannot be opened ". Logon Failed.
User 'iis APPPOOL \ ielong 'Login Failed.

Source error:

An unhandled exception is generated during the execution of the current Web request. You can use the following exception stack trace information to determine the cause and location of the exception.

 

 

 

Case 3: The ISAP and CGI extensions related to v4.0 are not enabled, and the website cannot be used.

If a problem occurs in the product "Yi Long property management system" of a friend, contact me for help. I encountered the following exception during access:

================================ 00:12:57 ============== ================================

IP:

Message: to process this request, you must register the WebResource. axd handler in the configuration.

 

<! -- Web. Config configuration file -->

 

<Configuration>

<System. web>

<HttpHandlers>

<Add path = "WebResource. axd" verb = "GET" type = "System. Web. Handlers. AssemblyResourceLoader" validate = "True"/>

</HttpHandlers>

</System. web>

</Configuration>

Stack: In System. Web. Handlers. AssemblyResourceLoader. GetWebResourceUrlInternal (Assembly assembly, String resourceName, Boolean htmlEncoded, Boolean forSubstitution, IScriptManager scriptManager)

In System. Web. Handlers. AssemblyResourceLoader. GetWebResourceUrl (Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager)

In System. Web. UI. ClientScriptManager. GetWebResourceUrl (Page owner, Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager)

In System. Web. UI. ClientScriptManager. RenderWebFormsScript (HtmlTextWriter writer)

In System. Web. UI. Page. RenderWebFormsScript (HtmlTextWriter writer)

In System. Web. UI. Page. BeginFormRender (HtmlTextWriter writer, String formUniqueID)

In System. Web. UI. HtmlControls. HtmlForm. RenderChildren (HtmlTextWriter writer)

In System. Web. UI. HtmlControls. HtmlContainerControl. Render (HtmlTextWriter writer)

In System. Web. UI. HtmlControls. HtmlForm. Render (HtmlTextWriter output)

In System. Web. UI. Control. RenderControlInternal (HtmlTextWriter writer, ControlAdapter adapter)

In System. Web. UI. Control. RenderControl (HtmlTextWriter writer, ControlAdapter adapter)

In System. Web. UI. HtmlControls. HtmlForm. RenderControl (HtmlTextWriter writer)

In System. Web. UI. Control. RenderChildrenInternal (HtmlTextWriter writer, ICollection children)

In System. Web. UI. Control. RenderChildren (HtmlTextWriter writer)

In System. Web. UI. Control. Render (HtmlTextWriter writer)

In System. Web. UI. Control. RenderControlInternal (HtmlTextWriter writer, ControlAdapter adapter)

In System. Web. UI. Control. RenderControl (HtmlTextWriter writer, ControlAdapter adapter)

In System. Web. UI. Control. RenderControl (HtmlTextWriter writer)

In System. Web. UI. Control. RenderChildrenInternal (HtmlTextWriter writer, ICollection children)

In System. Web. UI. Control. RenderChildren (HtmlTextWriter writer)

In System. Web. UI. Page. Render (HtmlTextWriter writer)

In System. Web. UI. Control. RenderControlInternal (HtmlTextWriter writer, ControlAdapter adapter)

In System. Web. UI. Control. RenderControl (HtmlTextWriter writer, ControlAdapter adapter)

In System. Web. UI. Control. RenderControl (HtmlTextWriter writer)

In System. Web. UI. Page. ProcessRequestMain (Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

========================================================= ==========================================

I thought about whether it is the reason for the type of the application pool. It seems that the application pool is currently using integration, and it can be changed to a classic one,

Change the application pool to classic, and then report the following error:
HTTP 404.2-Not Found
The page you requested cannot be provided because of the "ISAPI and CGI restrictions" list settings on the Web server.
Then, go to the "ISAPI and CGI restrictions" in IIS7.5 and check that asp.net v4.0 is in the "not allowed" status,


Simply enable the 4.0-related functions...

 

Related Article

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.