Casbay Knowledge Base

Search our articles or browse by category below

Parser Error Message

Last updated: January 18, 2023
Estimated reading time: 1 min

Parser Error Message

Parser Error Message

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 IIS application, 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.

What is a Parse Error?

If the PHP code contains a syntax error, the PHP parser cannot interpret the code and stops working.
For example, a syntax error can be a forgotten quotation mark, a missing semicolon at the end of a line, missing brackets, or extra characters. This leads to a parse error because the code cannot be read and interpreted correctly by the PHP parser.

The corresponding error message does not necessarily display the exact line in which the error is located. In the following example, the trailing quotation mark is missing in line 2, but the parser will refer you to line 5 in the error message.

The parser will display an error message similar to this one:

Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in /homepages/12/d1123465789/htdocs/index.php on line 5

Please note: To avoid potential errors in missing or adding extra characters that should not be there, you can first put both sets of quotation marks or brackets, before you fill them with code. You can also use an editor that automatically enters the closing characters or highlights errors in the code for you.

For more articles on this topic, please visit our Knowledge Base- Shared Hosting

Was this article helpful?
Dislike 0
Previous: How to Update Domain Contact Information?
Next: HOW TO: Repair table in phpMyAdmin
Discover the perfect balance of performance and budget-friendly Dedicated Server plan !
Discover the perfect balance of performance and budget-friendly Dedicated Server plan !
High performance and low cost Dedicated Server plan 128GB from $185 – upgrade today!
High performance and cheap Dedicated Server plan 128GB from $185 – upgrade today!