IIS7 deploys the ASP. NET MVC4 program and reports an error. iis7mvc4

Source: Internet
Author: User

IIS7 deploys the ASP. NET MVC4 program and reports an error. iis7mvc4

Windows 7 is installed today.

IIS needs to be installed for web project development. After the installation, the web program has been mapped to the local IIS and the following error message is displayed during running.

The handler "PageHandlerFactory-Integrated" has an error module "ManagedPipelineHandler" in its module list"

Cause:

Vs2010 uses the 4.0 framework by default. The 4.0 framework is an independent CLR, which is different from the 2.0 Framework. To run a 4.0 website, you need to register the 4.0 framework with aspnet_regiis, use the 4.0 Class pool to run the 4.0 web project.

How can I use aspnet_regiis to register the 4.0 framework:

Start cmd (win key + R start cmd) and find the directory where 4.0 is located. My machine directory is;

Note: run the DOS window as an administrator.

 

Go to the directory C: \ Windows \ Microsoft. NET \ Framework \ v4.0.30319.

Start CMD to enter the directory above, as shown in figure

 

Note:: When you deploy a website on IIS7, IIS uses it by default. NET Framwork2.0, if you run. NET4.0 and. for the NET4.5 application, you need to modify the "application pool" Settings and change version 2.0 to 4.0. Shows the modification method:


The aspnet MVC4 project can run on VS, but it cannot run when it is deployed on IIS.

I personally think you should take a good look at whether your code has not been processed. For example, you think a piece of data will be found. No results. Then it is easy to solve this problem after being encapsulated into an object .. Of course there are some other reasons. This cannot be solved. You need to carefully check the code.
 
The aspnet MVC4 project can run on VS, but it cannot run after it is published to IIS.

Hey, NHibernateHelper. createNewSession
 

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.