Asp.net program "request unavailable in this context" error in iis7

Source: Internet
Author: User

When porting an earlier version of net to IIS In window7, the following error occurs:

"/" Indicates a server error in the application.

The request is unavailable in this context

 

Note:An error occurred while executing 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: the request is unavailable in this context

This is really strange, because it is okay to debug the program. It can be determined that this is definitely irrelevant to the project itself, that is, it is related to the environment, that is, it should be the iis7 problem.

Searching for the Internet for half a day: the problem is very simple, that is, the Web application pool configuration error. This error should be unique to iis7.

Solution:

Choose iis7-> current application virtual directory-> right-click-> Manage application-> Advanced Settings

Modify the application pool attribute: ultapppool is classic. Net apppool (that is, classic.

Or directly go to the application pool, double-click defaultapppool, and change "managed pipeline mode" to "classic" in the pop-up window. Just exit.

 

Note:

In IIS 7, the application pool has two running modes: integration mode and classic mode. The application pool mode affects how the server processes managed code requests. If a hosted application runs in an integrated application pool, the server uses the IIS and ASP. NET integrated request processing pipelines to process requests. However, if the hosted application runs in a classic-mode application pool, the server will continue to host code requests through the aspnet_isapi.dll route, the method for processing requests is the same as that for applications running in IIS 6.0.

For more information about the integration mode in the managed pipeline mode of the IIS 7 Application pool, see ASP. NET 3.0 advanced programming.

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.