mcoolbeth
mcoolbeth

Reputation: 477

References between ASP.NET web applications

I have a Visual Studio solution containing two web applications.

I would like the first to depend on the second (pages in the first may contain links to, or possibly post to pages in the second).

Furthermore, I would like to be able to launch the first project on a development server (standard debugging procedure for web apps in VS) and have the references to the second project be fully functional.

Does anyone know the best way to achieve this?

Thanks.

Upvotes: 3

Views: 98

Answers (2)

Sonic Soul
Sonic Soul

Reputation: 24959

not entirely sure what you mean by "depend on second" but i am guessing that you want to share some code between them and than step through that code while debugging?

why not extract all common code into common re-usable assemblies? That will make it easy to debug regardless which application is running.

Upvotes: 0

Jim Lamb
Jim Lamb

Reputation: 25805

You can establish the dependency relationship by right clicking on your top-level web application project and selecting Project Dependencies. Check the dependency web application project in the list. To start both projects for debugging, follow these steps:

  1. Right click on the solution and select Properties.
  2. Select Common Properties > Startup Project from the list on the left.
  3. Select the Multiple startup projects option
  4. Set the Action column appropriately for your projects and click OK

When you start the debugger, your projects should startup as desired.

Upvotes: 1

Related Questions