More and more programmers have been using it since the release of VS2010, many of whom use MVC as a new development framework, but we also have a lot of problems when it comes to system deployment, because most Windows servers currently use Windows Server 2003, so we need to install a high version of the. NET Framework 3.5 or 4.0 on the server to keep our system running.
Next we deploy the. NET Framework 4.0 MVC application System, first installing the. NET Framework 4.0 on the server, but often encountering an error when installing, which is to install Microsoft's Windows Imaging components ( WIC), this is very simple, we just download to the official website of Microsoft, install WIC and continue to install the. NET Framework 4.0 is OK.
Deploying the system, like the. NET Framework 2.0 application deployment, just select the. NET Framework 4.0 when you finally select the ASP.
Visit website address, often encounter an error, Could not load file or assembly ' SYSTEM.WEB.MVC, version=2.0.0.0, .... "
Analyzed under the reason that ' SYSTEM.WEB.MVC 2.0 is released with VS2010, generally and is located in C:/Program files/microsoft asp.net/asp.net MVC 2/assemblies/ System.Web.Mvc.dll, so we have to do some work on the reference when we use it.
The most convenient is to put the System.Web.Mv.dll file in the system's Bin directory, but this regeneration or do SVN synchronization when it is inconvenient, give a method:
1. You can create a folder in your project to hold a. dll that references a third party
2. Copy the System.web.mvc.dll to this folder
3. Change the Web project reference to this DLL to System.web.mvc.dll in the folder
4. Set the "Copy Local" property to True for the DLL. This can be done by browsing to the WEB project in the References folder by clicking the SYSTEM.WEB.MVC pull-up property, selecting "Properties" Copy Local "and ensuring that it is set to true.
This will not miss the dynamic library every time it is released or regenerated.
Problem solving, deployment success!
MVC4 deployment could not load file or assembly System.web.http.webhost or other file error