The virtual path maps to another application, sturcturing a solution

Posted on 2005-05-16
Last Modified: 2012-08-14
I want to create a template system using

I am trying to put the templates in a global project which will then be used by pages in other projects in same solution. so here is the folder structure:

Page Config file: H:\Inetpub\wwwroot\MyMasterPages\Page.config
User Controls: H:\Inetpub\wwwroot\MyMasterPages\Controls\MyTemplate\
ASPX Page: H:\Inetpub\wwwroot\MyMasterPages\MyProject\WebForm1.aspx

to access the user controls, i changed the path in Page.config from

<Control Path="~/Controls/DivisionTemplate/PagePre.ascx" ControlPlacement="BeforeContent" />


<Control Path="../Controls/MyTemplate/PagePre.ascx" ControlPlacement="BeforeContent" />

but when running Webform1.aspx i get following error:
The virtual path '/MyMasterPages/Controls/MainTemplate/Header.ascx' maps to another application, which is not allowed.

so what does ~ mean here? and how do i solve this problem?

considering this problem i realize that i lack in-depth knowledge about how to organize the solution.

i m basically trying to create a solution with multiple projects in a way that each project is going to be a self-sufficient and at the end i will be able to sell each project separately. so each project will have its own business logic and data access layer. the stuff which will be accessed by more than one project will be kept in a separate project called "Common", which will have all the images, style sheets, global code libraris, page templates, user controls etc.

but this structure is giving me alot of problems like references and asseblies, so is this an advisable structure? if not what is the better one? if yes where can i read details about this way of sturcturing?
Question by:aosexpert
    LVL 9

    Expert Comment

    By placing a tilde (~) in front of a path, a URL can refer to the root of a site

    See this

    and here is an article on sharing pages and user controls..


    Author Comment

    ~ gives the root of the working project, but in my case the user controls are present in a separate project in the same solution.

    Ok tell me is it a good idea to make separate projects for each module in the solution or simply make their seaprate folders within one project? i have the told the reason in my first post why i selected to make separate projects instead of folders to recap, i want to make each module self-sufficient so that i just copy the project from the solution with others required projects in a solution.

    LVL 9

    Accepted Solution


    Yo have one solusion with different projects.. right?
    Even with this .. If u wanat to sell one project u have to give the whole assemblies ..right?
    I would prefer a master solusion with different solusions for each modules..
    --  "Partitioned Single Solution Model" - allow you to work on smaller subsystems within your overall system but retain the key benefits of project references.

    You can read more on this



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now