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

During the development we came across this issue, which wasted a lot of our precious time. So I decided to share its solution with everyone. We have Project and Sub-Project Structure i.e. we have a root project and several sub-projects. The ROOT Project is entitled as TEMS8 and all other subprojects have been configured as per the image below. (Click on the image for large size)


Now after setting up everything on a new Machine, we came across the Error as
The virtual path maps to another application, which is not allowed

Finally after investigation, we figured out that we have created multiple virtual directories which mainly causes the issue. For instance, we have another virtual directory created for DATADEF which is inside the virtual directory of TEMS8. So this was the main issue. The resolution was to remove the DATADEF Virtual Directory. Everything worked out perfectly, once we removed the inner virtual directory. We should not have something like this image below




We should always have one Virtual Directory and must not have inner virtual directories. When we removed the Virtual directory of GOALS (as in the above case), everything started working properly. This structured worked out as mentioned in the below image. Notice, we have only one root Virtual Directory.








Comments

  1. As-Salam-O-Alaikum Nabeel bhai,
    Shadee mubarak,

    yes your solution, I got trapped in this scenario tonight (Thursday 6th Jan 2011) hehe

    Thanks for your post here: http://forums.asp.net/p/536662/536662.aspx
    and keep posting there. I post there too.

    ReplyDelete
  2. The Best and Only Solution i Get , Apart from that silly "~" solution.

    ReplyDelete
  3. Thanks, I get resolved my issue after following it!!!

    ReplyDelete
  4. In My case it was wrong path in Layout Page. It should be like
    Layout = "~/Views/Shared/_MySiteMaster.cshtml" instead of
    Layout = "~/Views/Shared/_MySiteMaster.cshtml"

    ReplyDelete

Post a Comment

Popular posts from this blog

Export Data from AX 2012 - using DIXF (Data Migration Framework)

Agile Management - TFS (Priority, Stack Rank and Severity)