Summary of ASP. net mvc website deployment

Source: Internet
Author: User

Recently, I was about to deploy a new test site for MVC to IIS. I didn't expect a series of problems or errors. I was prepared to record them.

The first question is how to deploy the MVC site to IIS?

Now my system is Windows 7 and IIS is also version 7.0. At the beginning of deployment. NET 2.0 deployment method, select the Classic mode, the result error page appears.

This figure shows how to deploy. net2.0 as expected.ProgramThe pool is created by yourself and is in the Classic mode.

The following figure shows the specific error page:

Then, search for the cause of the problem on g.cn and find that it is super simple to deploy under IIS 7.0, but it is troublesome to deploy IIS 6.0. I will not describe it here, we provide a solution for a garden friend. How to deploy ASP. net mvc websites in iis6.0.

I simply changed the application pool and used the default defaultapppool. However, other errors are reported below. See the figure below:

The error message indicates that the user permission of the database is incorrect. I used sqlserver express for the database of this program. In short, it is the database file created in, as a result, this problem occurs, but you do not want to migrate the database file to sqlserver. Then, find the answer. The result was taken to the msdn Forum by g.cn. It contains all the English description and answers to the questions. Then, the patience was read one by one and the above prompts were followed, if you have the permission to add a file to the network service user, the result is not correct. At this time, I saw a foreign hero on the web. add this <identity impersonate = "true" username = "systemusername" Password = "systempassword"> to config. The website with the correct results will pop up.

In this way, the website developed by MVC is successfully deployed on IIS.

References:

Http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/527bf46a-b3fe-4ae6-8b41-eb40024399c8/

Http://www.cnblogs.com/deafcat/archive/2009/03/03/1401966.html

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.