views:

117

answers:

3

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 to 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.

+1  A: 

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.

Min
Yeah, MVC, Abstractions and Routing have all been set to Copy Local. My suspicion is that the problem lies somewhere between my using MVC2 and the web host install (v.1, maybe?) conflicting.
Phil.Wheeler
I think it's not likely to be caused by conflicting, since you provided full assembly name in web.config.
Raymond
A: 

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.

Raymond
No luck, sorry.
Phil.Wheeler
well. according to the error message, your assembly seems to be missing manifest.Did you compile the mvc assembly yourself? Is it a valid assembly that works fine on your own machine?
Raymond
+1  A: 

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.

Phil.Wheeler