Search code examples
webiisasp.net-mvc-5web-deployment

System.IO Exception after IIS deployment


MVC 5 project after IIS deployment on browse returns "Could not load file or assembly 'System.IO' or one of its dependencies". Things I have tried via stackoverflow and googling are

  1. Clean & Rebuild solution
  2. Deleting bing & obj folders
  3. Setting website folder access to IIS Users with full access
  4. Removing & adding the System.IO.dll
  5. Setting propertygroup under .csproj file

Please can anyone help me in getting the cause.

Application is working fine on local machine with no errors. But getting the above error on IIS deployment.


Solution

  • Thank you guys for the great suggestions. Policy blocker was creating the issue and got resolved after signing system.io dll