Could not load file or assembly or one of its dependencies. Access is denied.

Posted on May 24, 2011

2


I was getting an error today complaining about loading one of the assemblies in my web service.

I spent hours adding all sorts of security privildges to the folders in windows and in IIS.

initially I had the dll name in my google search, this lead me down completely the wrong path, finally I typed in the text in the title of this blog post

In the end the problem turned out to be permission on temporary ASP.NET folder and I finally found this article on how to set permission for the Temporary ASP.NET folder, which you can read here

To assign write permissions to the Temporary ASP.NET folder

  1. Click Start, click Run, type explorer, and then click OK.
  2. In Windows Explorer, move to the <drive:>\Windows\Microsoft.NET\Framework\v2.0.50727 (or <drive:>\WinNT\Microsoft.NET\Framework\v2.0.50727, where appropriate) folder.
  3. Right-click Temporary ASP.NET Files, and then click Properties.
  4. In the Temporary ASP.NET Files Properties dialog box, on the Security tab, click Add.
  5. In the Enter the object names to select text box, type <Domain or Computer name>\RunTimeUser, and then click OK.
    Aa545633.alert_note(en-US,CS.70).gifNote:
    As appropriate, substitute the user name for the anonymous user account you created for “RunTimeUser”.
  6. In the Temporary ASP.NET Files Properties dialog box, in the Groups or user names list, select the RunTimeUser account.
  7. In the Permissions for RunTimeUser list, select Write in the Allow column. (Read & Execute and Read should already be selected in the Allow column Click OK.
  8. In the Security dialog box, click Yes.
  9. Repeat steps 3 through 8 for the Web service accounts: CatalogWebSvc, MarketingWebSvc, OrdersWebSvc, and ProfilesWebSvc.
About these ads
Posted in: .NET