-1

After deploying website on IIS, I am getting error. I have one main directory and then one inside of it and trying to access second one which is using .NET Framework Version 3.5, parent one using .NET Framework 4.0.

Please help

Parveen Singh
  • 21
  • 1
  • 2
  • 3
  • Possible duplicate of [Could not load file or assembly 'Microsoft.Web.Infrastructure,](http://stackoverflow.com/questions/13149851/could-not-load-file-or-assembly-microsoft-web-infrastructure) – James Skemp Dec 06 '16 at 20:02

2 Answers2

2

I got answer: https://www.mindstick.com/Forum/34108/could-not-load-file-or-assembly-microsoft-web-infrastructure-version-1-0-0-0-culture-neutral-publickeytoken-31bf3856ad364e35-or-one-of-its-dependencies-the-system-cannot-find-the-file-specified

added following references

dd the following references to the project:

Microsoft.Web.Infrastructure
System.Web.Razor
System.Web.WebPages.Razor
System.Web.WebPages.Deployment

Set the property Copy Local to True for the following references:

System.Web.Helpers
System.Web.MVC
System.Web.WebPages
Microsoft.Web.Infrastructure
System.Web.Razor
System.Web.WebPages.Razor
System.Web.WebPages.Deployment
Parveen Singh
  • 21
  • 1
  • 2
  • 3
0

Some web servers (such as certain cloud or virtual servers) don't include all the components of the ASP/.NET framework. You therefore need to set Copy Local = True for all your references so that these are copied across when you publish/deploy

apc
  • 5,306
  • 1
  • 17
  • 26