James
James

Reputation: 31748

How to nest ASP.NET websites

Is it possible to nest one ASP.NET website within another, for example:

http://example.com is an application root http://example.com/differentsite is also an application root

If it is possible, what should be stuck in the web.config file of the parent website to prevent it interfering with the child site?

Note: This is for .NET 4.0 shared IIS7 hosting

Thanks in advance

Upvotes: 1

Views: 2260

Answers (2)

Guffa
Guffa

Reputation: 700362

Yes, you can nest web sites by making folder an application, or adding a virtual folder that points to another application.

You need access to manage IIS on the server to do that, though.

Upvotes: 0

Amiram Korach
Amiram Korach

Reputation: 13286

Right click on the nested folder is IIS manager and click on "Convert to Application". This way they can live together. If you want them to run in separate processes so they won't have the same Application Pool settings, Create another application pool and assign one of the sites to it. BTW, if the site folders are nested, they don't have to always appear in IIS manager as nested. You can add application to the default web site (or create a new site) and point it to the nested folder.

Upvotes: 2

Related Questions