views:

30

answers:

2

Visual Studio allows you to make "Web Sites" and "Web Applications", but, inside a project, can you have one within the other?

Say I have my website "www.mysite.com" and I have an application called "BudgetCalculator". One the production server, this is supposed to be located at:

www.mysite.com/BudgetCalculator

And the BudgetCalculator app contains links back to other parts of the website, like "/page1" and "/page2".

However in Visual Studio, when they're listed as two different projects, they're on the same level. When I fire up the debugger for the BudgetCalculator app, those links aren't going to point back to the main website, like they should.

Is there a way around this?

A: 

A project cannot host/contain another project in Visual Studio.

You can however create a project that sites in the directory of another higher level project when you create it, however they may not be directly linked, so you couldn't debug them both at the same time.

ck
+2  A: 

One solution would be to stop using the built-in .NET Web Server.

Use IIS, create one site, and make your Web App a Virtual Directory inside of the Web Site.

Justin Niessner