Asp. NET is not available in the context of the IIS7 solution _ practical skills

Source: Internet
Author: User
Tags stack trace
Johnny Win7 has been a few months of time, but a few days ago to reload the system, is still used Win7, but today in the opening of the VS2009 project in IE after the test when the open will appear an error as follows:
Request not available in this context
Note: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace for more information about the error and where the error occurred in the code.
Exception Details: System.Web.HttpException: Request not available in this context
SOURCE Error:
Copy Code code as follows:

Row 28:protected void Application_Start (Object sender, EventArgs e)
Line 29: {
Row 30:applicationconfiguration.onapplicationstart (Context.Server.MapPath (Context.Request.ApplicationPath));
Line 31:
Line 32:}

This is really strange, think back, just started with Win7 seems to have encountered this problem, but forget how to solve. It is certain that this must not be related to the project itself, because it is normal before reloading, that is, it is related to the environment, that is, it should be the problem of IIS7.

Search engine good is to create a lazy person, encountered problems, not "Baidu you do not know", but google you will know, so or on Google to find a moment, indeed with my judgment is correct, quoting the star of the week to say "I am a fucking genius ah." The problem is simply that the Web application pool configuration error is caused by the error that is unique to IIS7.

Solution:

Right-->-> management application-> Advanced settings in iis7-> current application virtual directory

To modify the application pool properties:DefaultAppPool is Classic. NET apppool (or classic ).

or directly to the application pool, double-click DefaultAppPool , in the pop-up window of the "Managed piping mode" to the classic , OK exit can be.
Tis:
In IIS 7, the application pool has two modes of operation: Integrated mode and Classic mode. The application pool pattern affects how the server handles requests for managed code. If the managed application is running in an application pool with integrated mode, the server will use the integrated request processing pipeline of IIS and asp.net to process the request. However, if a managed application is running in a classic-mode application pool, the server continues to route managed code requests through aspnet_isapi.dll, and it processes the request as if the application were running in IIS 6.0.

For more information about the integration mode in the managed piping mode of the IIS 7 application pool, you can click here to find out.

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.