App_global.asax.dll - Access is Denied Error [Solved]

It's usually the misconfigured permissions to blame

Reading time icon 4 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

fix app_global.asax.dll - 'access is denied error

When trying to start a new project or publish one in Visual Studio, you often get the App_global.asax.dllAccess is denied error, which prevents the process from going through.

The error appears due to missing privileges, misconfigured permissions, third-party conflicts, or the pre-stored temporary files. All these can be fixed in no time with the solutions listed next!

How do I fix the App_global.asax.dll – Access is denied error?

1. Precompile before publishing

The easiest fix, and one that worked for 3 out of 5 users, was to precompile before publishing. All you have to do is tick the checkbox for Precompile before publishing under the Settings tab.

precompile before publishing
Precompile before publishing

Once done, the App_global.asax.dll and app_global.asax.compiled files should reappear in the required folder.

2. Run Visual Studio as administrator

  1. Right-click on the Visual Studio launcher (.exe file), and select Properties.
  2. Go to the Compatibility tab, and tick the checkbox for Run this program as an administrator.run as administrator to fix app_global.asax.dll - 'access is denied
  3. Finally, click on Apply and OK to save the changes and then try publishing the app in Visual Studio.

If you are getting the App_global.asax.dll – Access is denied error due to missing privileges in Visual Studio, running the app as an administrator should get things up and running!

3. Reconfigure the permissions

  1. Press Windows + E to open File Explorer, navigate to the path listed for the App_global.asax.dll file in the error message, right-click on the file, and choose Properties.
  2. Go to the Security tab, and click on Advanced.advanced security
  3. Click on Change.
  4. Now, enter Everyone in the text field, click Check names, and then OK. If you want to limit the permissions to a specific user or group, add it instead.permissions
  5. Click on Apply and OK to save the changes.
  6. Close the Properties, again open it, head to the Security tab, and then click on Edit.edit
  7. Click on Add.
  8. Again, enter Everyone in the text field, click on Check names, and then on OK.
  9. Select Everyone from the list, and tick the checkbox for Full control. full control to fix app_global.asax.dll - 'access is denied
  10. Finally, click Apply and OK to save the changes.
  11. Now, try publishing the application using Visual Studio, and verify whether the App_global.asax.dll – Access is denied error persists.

4. Add/remove the PrecompiledApp.config file

For most errors related to App_global.asax.dll, simply restoring the PrecompiledApp.config file does the trick. Make sure to place the file in both the root and bin directories to get rid of the Access is denied errors!

Surprisingly, for a few, deleting the PrecompiledApp.config from the root of the publish folder also worked. So, do try that when nothing else works.

5. Uninstall any third-party antivirus

  1. Press Windows + R to open Run, type appwiz.cpl in the text field, and hit Enter.
  2. Select the third-party antivirus from the list, and click on Uninstall.uninstall to fix app_global.asax.dll - 'access is denied
  3. Follow the on-screen instructions to complete the process.
  4. Once done, reboot the PC and check for improvements.

In many of the cases I observed, it was actually a third-party antivirus like Kaspersky and McAfee that triggered that App_global.asax.dll – Access is denied error. Here, simply uninstalling the app works!

You could also create an exclusion in the antivirus for the following folders to prevent such errors:

  • C:\Windows\Microsoft.NET\Framework
  • Build folder

If you don’t want to keep things unprotected, look at our top picks for antivirus solutions!

6. Delete the temporary ASP.NET files

Depending on the version of the .NET framework installed, you will need to head to one of the following locations and delete all the temporary files for your application:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files

Once done, you can finally build your solution and run it without facing any more errors!

These are the best and tested ways to fix the App_global.asax.dll – Access is denied error. Remember, before you delete any file(s), always create a copy of it to restore the data in case things don’t go as expected.

While you are here, read our detailed comparison of Visual Studio and Rider, and find out if the latter is a better choice for you!

Which fix worked for you? Share with our readers in the comments section.

More about the topics: DLL errors, visual studio