HttpModule, virtual directories and web.config

G

Guest

Hi,

We have an application that is installed in default web site (root web
site). The same application will be installed as virtual directories under
the root site e.g. <default web site>/app1 and <default web site>/app2.
Starting the root application goes well but when starting app1 it complains
that the HttpModule installed for the default web site is already loaded. I
don't understand this. The following thread mentions a nasty workaround for
the <remove> tag(http://tinyurl.com/84vt9) but I don't quite understand how
these applications relate to each other. Is only HttpModules shared or will
these apps share more things?

When pointing <default web site> to another directory without a web.config
file I can start app1 and app2 without any problem. Can someone shed some
light on this and maybe point me to some good articles because I can't find
any good ones describing how web.config settings in virtual dirs relate to
the root site.

I can't run these apps under another IIS instance because the need to share
the same hostname/port.

Thanks in advance,
Manso
 
J

Juan T. Llibre

If you're running applications in subdirectories of the root,
you should *never* make the root directory itself an application.

That will, as you've found out, make all applications in subdirectories
dependent on the root application, and the root's web.config will take
precedence over all other web.configs in all application subdirectories.

The <default web site> should *never* be an application itself.

You don't need any "good articles".
Just unload the root directory's application using the Internet Service Manager.

As soon as you do that, *all* your applications in subdirectories
will work independently of each other *and* independently of the root.
 
G

Guest

Juan,

Thanks for your prompt and good reply. Our problem is that we have to deploy
this application as a root web site. To my knowledge root sites are the only
place you can use host headers. Often, our customers have plenty of sub
applications (virtual directories) already in place and they need to run this
under the same domain name. So, let's say our application is installed on
www.mysite.com they need to keep www.mysite.com/app1, www.mysite.com/app2
etc. Sounds strange that the ASP.NET configuration model can't accommodate
this setup. Can you think of any other way to have multiple independent
"subsites" sharing the same host headers?

Thanks,
Manso
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top