Hi im having an issue migrating our .NET 2.0,1.0 and 0.0 WebForms application in our new SharePoint 2013 where it always prompt in every applications.

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

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

I already cleared ASP.NET Temporary Files and added Network Services on the Security of 2.0 and 4.0 folder and error still occurs.

Any experience the same issue? Any help is appreciated.


  • Delpoy your assemblies to GAC and try – Aanchal Jun 18 '14 at 7:13
up vote 1 down vote accepted

this question should be resolved by:

In the IIS7 control panel, to go the Basic Parameters for the web site. Specify the impersonated user.

When reloading the site, it will now complain that it can't access "...\Temporary ASP.NET Files" give read/write access to the impersonated user.


Try looking for 'App_Code' in your web.config files?

cd \inetpub\wwwroot\wss
findstr /s App_Code web.config

If that outputs anything it should help you work out why ASP.NET is trying to load "App_Code" as an assembly.

  • Can you please try to extend this answer a bit, with steps to take, to make it more useful? :) – Robert Lindgren Jun 19 '14 at 6:05

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.