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