The virtual path maps to another application, sturcturing a solution

Posted on 2005-05-16
Medium Priority
Last Modified: 2012-08-14
I want to create a template system using http://www.codeproject.com/aspnet/PageFramework.asp?df=100&forumid=102656&select=1047249

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
  • 2

Expert Comment

ID: 14010327
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 asp.net pages and user controls..



Author Comment

ID: 14016659
~ 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.


Accepted Solution

riyasjef earned 1500 total points
ID: 14017117

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




Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

839 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