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

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse 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:  <%@ Register TagPrefix="uc1" TagName="footer" Src="../common/footer.ascx" %>
Line 2:  <%@ Register TagPrefix="uc1" TagName="header" Src="../common/header.ascx" %>
Line 3:  <%@ Page Language="vb" AutoEventWireup="false" Codebehind="index.aspx.vb" Inherits="mytutor.index"%>

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.

  • 2 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Related Articles

How to configure ASP.NET 2.0 medium trust in your testing environment/server

You may refer to the step below to set Windows Server ASP.NET medium trust level. By default...

Could Not Load Type

SYMPTOMS When you browse to an .aspx page, you may receive one of the following error messages:...