1
votes

I moved my existing ASP .NET web sites and web applications to a new server, and I'm getting the following error:

Could not load file or assembly 'System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I located this assembly on my computer, and copied it to the BIN folder of my web site. It gives a new error:

Could not load file or assembly 'System.Web.WebPages.Deployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Does this mean ASP .NET is not properly installed on the server machine? How do I go about fixing this? I also noticed that the assembly is present on my computer somewhere in the Program Files (x86)/Microsoft ASP.NET folder. However, the Program Files (x86)/Microsoft ASP.NET folder does not exist on the server.

2

2 Answers

2
votes

Solution: I installed both ASP .NET Web Pages and ASP.NET MVC 4 on the server. This installed the missing assemblies and created the folders that were missing.

0
votes

The exceptions speak for themselves: Your project has referenced version 2.0.0.0 of this assembly and you have copied version 1.0.0.0

Find the correct version and you'll be OK