RIZ
RIZ

Reputation: 1

ASP.net MVC ERROR after deploying on the hosting web site

I get the assembly error Parser Error Message: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Any idea what needs to be included.

Upvotes: 0

Views: 230

Answers (5)

Tony Borf
Tony Borf

Reputation: 4660

In Visual Studio in your project go to the reference folder find the "System.Web.Mvc", "System.Web.Routing", and "System.Web.Abstractions" and set the "Copy Local" property to TRUE. This will copy the files to the Bin directory of your application, when your app is built. Your webserver does not have these files installed, that is why you are getting this error.

Upvotes: 0

Anthony Potts
Anthony Potts

Reputation: 9160

Have you set your project to do bin deployment?

See this post by Phil Haack: http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx

Upvotes: 0

Daniel Elliott
Daniel Elliott

Reputation: 22857

Did you make sure to copy the second web.config file that resides in the Views directory up to the host?

Also the following should be in the "main" web.config.

<assemblies>
<add assembly="System.Web.Mvc, Version=1.0.0.0, 
     Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
...
</assemblies>

Phil Haack explains how to BIN deploy the MVC here if your host has notr installed.

Kindness,

Dan

Upvotes: 1

Freddy
Freddy

Reputation: 3274

Does the web hosting server has the MVC framework installed? I am assuming you installed in on the development environment but not on your hosting server. You need to install the framework also on the hosting server.

If the hosting server has the MV framework installed, check that the version installed on the development environment is the same as the hosting environment.

Upvotes: 0

Chris Arnold
Chris Arnold

Reputation: 5753

You will need to install the MVC redistribution files from here

Upvotes: 0

Related Questions