It takes several months for Johnny to change to Windows 7, but the system was reinstalled a few days ago and Windows 7 is still used, the error is as follows:
The request is unavailable in this context
Note: An unhandled exception occurs 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: the request is unavailable in this context
Source error:
Copy codeThe Code is as follows: row 28: protected void Application_Start (Object sender, EventArgs e)
Row 29 :{
Row 30: ApplicationConfiguration. OnApplicationStart (Context. Server. MapPath (Context. Request. ApplicationPath ));
Row 31:
Row 32 :}
This is really strange. In retrospect, it seems that we encountered this problem when we first started using Win7, But we forgot how we solved it. It is certain that this has nothing to do with the project itself, because it is normal Before reinstallation, that is, it is related to the environment, that is, it should be IIS7.
A good search engine is a lazy person. If you encounter a problem, you don't know about Baidu, But you will know about Google, so you can find it on Google, indeed, I was right. I quoted Zhou Xing as saying, "I am a fucking genius ". The problem is very simple. It is caused by a 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.
Tis:
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 managed pipeline mode of the IIS 7 Application pool, see here.