468,289 Members | 1,915 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,289 developers. It's quick & easy.

HttpModule, virtual directories and web.config

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
Nov 19 '05 #1
3 1975

not sure , if this will help

"Make Multiple Visual Studio .NET Projects Participate in the Same Web
Application"

http://support.microsoft.com/default...en-us;307467#5


"Manso" wrote:
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

Nov 19 '05 #2
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.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Manso" <Ma***@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
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

Nov 19 '05 #3
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

"Juan T. Llibre" wrote:
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.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Manso" <Ma***@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
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


Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mark | last post: by
reply views Thread by Yogesh Pancholi | last post: by
1 post views Thread by Mark | last post: by
1 post views Thread by jonas | last post: by
reply views Thread by NPC403 | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.