Click here to Skip to main content
11,932,446 members (54,527 online)
Click here to Skip to main content
Add your own
alternative version


33 bookmarked

Separating an ASP.NET Web Application into multiple Web Projects (Assemblies)

, 29 Aug 2004
Rate this:
Please Sign up or sign in to vote.
This article outlines how to separate an ASP.NET Web Application into multiple Web Projects (Assemblies).


Sometimes, when a Web project is large and complicated, it is difficult to manage it as a single unit. Every small change in code requires recompiling of the whole unit and doing that is not so efficient. The solution is to separate a large Web project into multiple child projects and reference them from the main project. In this article, I will show how to implement this method.


Solution Explorer

First, let's create the main ASP.NET project in Visual Studio .NET. I will call it MainWeb. Then I will add two child projects:

  1. Child1 – C# ASP.NET project.
  2. Child2VB – VB.NET ASP.NET project.

In the location box of Add New Project dialog, we will type http://localhost/MainWeb/Child1 for Child1 and http://localhost/MainWeb/Child2VB for Child2VB.

The next step will be removing of global.asax and web.config from both child projects and reference them from the MainWeb project.

We almost have done. Now, we need to remove Child1 and ChildVB2 virtual directories from IIS.

That’s all.


Implementing this method on your projects has several advantages:

  • You will be able to write several parts of your Web project in different languages (C#, VB.NET…).
  • Doing some changes in code will not cause to recompiling of the whole assembly.
  • You will be able to separate a large project into logical units that will share common resources.
  • It is easier to maintain a small logical unit than a large one.

The disadvantages:

  • Visual Studio doesn’t support this method directly, so you have to make all these steps by your own.
  • Assemblies that access each other's resources must set references to each other. Visual Studio .NET does not allow circular references.
  • This solution is good only for large projects. Implementing this method on small Web applications is complex additional work.

This article is based on

How To Create an ASP.NET Application from Multiple Projects for Team Development.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Michael Kalika
Web Developer
Israel Israel
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralUsing Web.config from child projects Pin
AndrusM3-Jun-09 9:55
memberAndrusM3-Jun-09 9:55 
QuestionHow do we do this in ASP 2.0 Pin
Karijn14-Oct-05 2:24
memberKarijn14-Oct-05 2:24 
GeneralThanks for the article Pin
Nayan S. Patel28-Aug-05 8:40
memberNayan S. Patel28-Aug-05 8:40 
GeneralAuthentication Pin
Eric Newton6-Nov-04 11:08
memberEric Newton6-Nov-04 11:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151126.1 | Last Updated 30 Aug 2004
Article Copyright 2004 by Michael Kalika
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid