Linux ~ . Net MVC deployment problems and solutions,. netmvc

Source: Internet
Author: User

Linux ~ . Net MVC deployment problems and solutions,. netmvc

Over the past few days, I have been engaged in the deployment of. net mvc in linux. I have encountered many problems. Fortunately, some friends have helped me solve the problem!

Environment:Linux + Mongo + Jexus

Expected results: run the MVC website developed by windows + vistualstudio.

Problem: It can be parsed, but some running-time (CLR) errors may occur.

 

These problems are caused by the conflict between Microsoft's assembly and mono Assembly, that is, the corresponding assembly in the MVC website, but the mono framework also implements a set on linux, and the two conflict, this exception is thrown.

Solution

Delete the MVC website's own assembly:Microsoft. Web. Infrastructure. dll

The following problems are caused by webap routing:

Solution

After commenting on it and running it, the old problem is gone, but the new problem comes.

Solution

This problem is caused by the absence of a layout page in MVC. I have read one. layout does not exist. After adding it, the problem is solved.

 

Use EF to connect to the SQLSERVER Database

Note: EF5 and earlier versions, and. the net class library is closely integrated, so it is not feasible to deploy it on mono. You need to upgrade it on nuget. It can be used in Versions later than EF6.0. It transfers the EF core module from system. put it out in data, put EF alone, very good! Decoupled!

 

The problem has finally been solved. Thanks again!

Reference: http://www.cnblogs.com/Leo_wl/archive/2013/05/24/3097089.html

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.