Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The virtual path XX maps to another application, which is not allowed.

Tags:

c#

asp.net

iis

I have copied one website to another folder and tried to run it in Visual Studio using IIS, but for some reason it is giving me a compile error in the following lines in the web.config file:

    <add tagPrefix="QuickBuck" tagName="RecentlyModified" src="/Controls/RecentlyModified.ascx" />
    <add tagPrefix="QuickBuck" tagName="Sitemap" src="/Controls/Sitemap.ascx" />

There is also another line underneath them which doesn't error, making this even stranger:

    <add tagPrefix="QuickBuck" tagName="Menu" src="/Controls/Menu.ascx" />

The controls are there, why is this happening? The exact errors are like so:

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.   

There isn't actually a line number next to the errors so I assume it is from the web.config. Please help this is driving me crazy!

like image 710
TheGateKeeper Avatar asked Nov 22 '12 19:11

TheGateKeeper


2 Answers

I don't know what happened but I was able to get it to work by putting ~ in front of the path. Hope this helps someone.

like image 92
TheGateKeeper Avatar answered Nov 15 '22 21:11

TheGateKeeper


Ts is due to you may have two copies of the .aspx file in some other location of your Solution. So it may refer that too, So try delete the duplicate file from the Solution and try it (Note : May be that file has not included in the project, but that reside in the Solution, So find that & delete it )

like image 38
GAM SKJai Avatar answered Nov 15 '22 22:11

GAM SKJai