LCJ
LCJ

Reputation: 22652

ASP.Net Deployment Error: Could not load file or assembly

I have a asp.net website in .Net 4.0 that runs fine in our staging environment. When we moved it into production we are getting following error

Server Error in '/mysite' Application.

Could not load file or assembly 'SupportSite.UI' or one of its dependencies. Access is denied. Exception Details: System.IO.FileLoadException: Could not load file or assembly 'SupportSite.UI' or one of its dependencies. Access is denied.

I assume it is a security issue. It is deployed using IIS WAS settings.

  1. What are the users for whom I need to grant permission (and on what all folders)?

  2. What is the user corresponding to aspnet_wp.exe or w3wp.exe?

REFERENCES

  1. Could not load file or assembly or one of its dependencies. Access is denied. The issue is random, but after it happens once, it continues

  2. Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies

  3. ApplicationPoolIdentity permissions on Temporary Asp.Net files

  4. could not load file or assembly, Tried all solution on net

Upvotes: 0

Views: 1615

Answers (2)

Oscar
Oscar

Reputation: 13960

I asume your using IIS 7.5..

You have two choices: Adding your library to GAC, or give read permissions to the application pool account.

See this about app pool account permissions: http://www.iis.net/learn/manage/configuring-security/application-pool-identities

Upvotes: 1

Stefan P.
Stefan P.

Reputation: 9519

You need to grant read permission for the lib folder to IIS_IUSRS account.

Upvotes: 1

Related Questions