Parser Error Message

Last modified: February 10, 2020
You are here:
Estimated reading time: 1 min

Parser Error Message: The virtual path ‘/common/footer.ascx’ maps to another application, which is not allowed.

Issue: I am getting this error when I try to run my ASP.NET application on my Windows hosting server. Parser Error.

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parser error details and modify your source file appropriately.

Parser Error Message: The virtual path ‘/common/footer.ascx’ maps to another application, which is not allowed.

Source Error:
Line 1, Line 2 and Line 3

Solution :

If the .ascx file is in one folder configured as an application in IIS, and the page from which you’re trying to use it is in a different IISapplication, it won’t work. User controls cannot be used across app domain boundaries, which is one of their weaknesses compared to custom server controls.

To solve this you can:
– Copy the .ascx file to a folder in the application from which you want to use it, which of course means that you now have two copies of the User Control to maintain.

Or

– Create a custom server control with the same functionality, give it a strong name, and install it in the Global Assembly Cache (GAC). Now you can use this control from any app on that machine.

Was this article helpful?
Dislike 0
Views: 44