虚拟路径XX映射到另一个应用程序,这是不允许的.

The*_*per 7 c# asp.net iis

我已经将一个网站复制到另一个文件夹并尝试使用IIS在Visual Studio中运行它,但由于某种原因,它在web.config文件中的以下行中给出了编译错误:

    <add tagPrefix="QuickBuck" tagName="RecentlyModified" src="/Controls/RecentlyModified.ascx" />
    <add tagPrefix="QuickBuck" tagName="Sitemap" src="/Controls/Sitemap.ascx" />
Run Code Online (Sandbox Code Playgroud)

在它们下面还有另一条线没有错误,这使得它更奇怪:

    <add tagPrefix="QuickBuck" tagName="Menu" src="/Controls/Menu.ascx" />
Run Code Online (Sandbox Code Playgroud)

控件在那里,为什么会发生这种情况?确切的错误是这样的:

The virtual path '/Controls/RecentlyModified.ascx' maps to another application, which is not allowed.       

The virtual path '/Controls/Menu.ascx' maps to another application, which is not allowed.   
Run Code Online (Sandbox Code Playgroud)

错误旁边实际上没有行号,因此我假设它来自web.config.请帮助这让我发疯!

The*_*per 16

我不知道发生了什么,但我能够通过放在~路径前让它工作.希望这有助于某人.