开发者

Troubleshooting an MVC deployment

开发者 https://www.devze.com 2022-12-14 21:50 出处:网络
I don\'t seem to have much luck with deploying MVC applications to my remote host. I\'ve just built an updated site in MVC v2 using Visual Studio 2010 and, having published and deployed it via FTP to

I don't seem to have much luck with deploying MVC applications to my remote host.

I've just built an updated site in MVC v2 using Visual Studio 2010 and, having published and deployed it via FTP to my host, it's not working.

Source Error:

Line 39:        <compilation>
Line 40:            <assemblies>
Line 41:                <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 42:                <add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 43:                <add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

As you can see from following the link, line 41 is apparently the problem, saying that the MVC assembly could not be loaded because it was supposed t开发者_运维技巧o contain a manifest.

I was fairly certain I'd provided all the correct references and file versions, so what else could I be missing? Wildcard application mappings have been implemented on the server.


asp.net mvc typically installs on the system that you run it on. When you built your VS project did you set MVC to copy to the destination directory? I know that setting the mvc dll to copy worked in deploying mvc 1.0 when it wasn't installed on the server.


The issue, upon checking again with the web host, was that MVC2 is not supported on my server and I had to set the project reference to version 1.0 of the MVC dll for the site to work.


Since you plan to use assemblies resides in local bin rather than GAC. You can try not using full name in web.config.

<add assembly="System.Web.Mvc"/>

You can check the manifest of the assembly with ildasm. Try it on the exact copy of mvc assembly you deployed on the web server to see if there is any problem with it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号