Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Multiple sites sharing single web.config file

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  Problems with extensionless imagery  
Author Message
anonymous1156

External


Since: Feb 09, 2004
Posts: 2



(Msg. 1) Posted: Mon Feb 09, 2004 5:56 pm
Post subject: Multiple sites sharing single web.config file
Archived from groups: microsoft>public>inetserver>iis, others (more info?)

Hello,

I would like to have several sites share a single web.config file. To accomplish this, I would point the root of these sites to the same folder. Is there any reason why I might not want to do this? (IIS 5 or 6)

In case you're wondering why I would do this, we have many web sites on a single server, and there are groups of sites that need to share common configuration information. I'd like to ease some administration by having one web.config file for each of these "site groupings". There may be many "site groupings", so I cannot use the machine.config file.

An interesting side question: assuming that I do the above, is it ok to have several web applications sharing a single bin folder? If that is an OK solution, then I just might be able to avoid using the gac, any thoughts on that?

Thanks,
BPearson

 >> Stay informed about: Multiple sites sharing single web.config file 
Back to top
Login to vote
dotnetmarshal

External


Since: Feb 09, 2004
Posts: 2



(Msg. 2) Posted: Tue Feb 10, 2004 2:45 am
Post subject: Re: Multiple sites sharing single web.config file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi BPearson,
I think it is important for you to understand how multiple Web.config
files can appear in multiple directories on a ASP.NET Web application
server.
Each Web.config file applies configuration settings to its own
directory and all the sub directories below it.Web.config files in sub
directories can supply configuration
information in addition to that inherited from parent directories, and the
sub directory configuartion settings can modify or override settings defined
in parent directories.
What you need to do is,
Make your groupings based on directory structure.
For example if you have database connection information
affecting all the web applications you put that key in the Web.config file
in the parent directory in the highest
level of the web site so that all the sub directories(up to the lowest
hierarchy in the directory structure) can inherit that information.
But in some cases for some web applications you need
to override the configuation settings in the root directory or put new
settings,so put that in the directory of that application so that
all the sub directories under it can make use of it(these sub directories
can be associated with it's own iis applications),you may call it a group.
You don't need to have several web applications
sharing the same bin folder,as you create more and more applications this
will be tedious to manage and
if that iis application goes down, lot of your web applications will stop
working.
You can have a web application with its own virtual
directory and bin folder,but you can still inherit the configuration
information from the parent directories.
If your application runs on Windows 2003 you can take
advantage of using application pools and configure each application on its
own worker process that
provides process-level isolation.This isolation is very good because if
something happens to the application pool only that web application(s) is
affected.

Hope this helps.
Regards,
Marshal Antony
..NET Developer
<a style='text-decoration: underline;' href="http://www.dotnetmarshal.com" target="_blank">http://www.dotnetmarshal.com</a>





"BPearson" <anonymous DeleteThis @discussions.microsoft.com> wrote in message
news:BD1B2D62-0D3D-4222-8DBE-FB2263AB2217@microsoft.com...
 > Hello,
 >
 > I would like to have several sites share a single web.config file. To
accomplish this, I would point the root of these sites to the same folder.
Is there any reason why I might not want to do this? (IIS 5 or 6)
 >
 > In case you're wondering why I would do this, we have many web sites on a
single server, and there are groups of sites that need to share common
configuration information. I'd like to ease some administration by having
one web.config file for each of these "site groupings". There may be many
"site groupings", so I cannot use the machine.config file.
 >
 > An interesting side question: assuming that I do the above, is it ok to
have several web applications sharing a single bin folder? If that is an OK
solution, then I just might be able to avoid using the gac, any thoughts on
that?
 >
 > Thanks,
 > BPearson<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Multiple sites sharing single web.config file 
Back to top
Login to vote
anonymous1156

External


Since: Feb 09, 2004
Posts: 2



(Msg. 3) Posted: Tue Feb 10, 2004 1:16 pm
Post subject: Re: Multiple sites sharing single web.config file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you for the reply. I do understand the cascading nature of the config files - but here is my dilemna:

machine.config allows me to specify configs that apply to the entire machine.
web.config allows me to specify configs that apply to one web site (or to more granular directories/virtual directories below).

BUT, I need something in between. I want a config file that will apply to x web sites on the machine.

eg - I need a multiweb.config that allows me to specify configs for web sites X, Y, and Z. I might have 1000 websites on a machine, and I need one config file that applies to 100 of them, another config that applies to another 200 and so on. Having web applications below the website level is not good enough, each web application must be a separate web site.

In my original post, I've gave a description of how I want to accomplish this, and I can't think of any negative consequences .... does anyone out there know of some reason why my proposed solution to this problem will not work? Or maybe someone knows that this is OK to do, and wants to say "go for it!"?

Thanks!
BPearson

----- Marshal Antony wrote: -----

Hi BPearson,
I think it is important for you to understand how multiple Web.config
files can appear in multiple directories on a ASP.NET Web application
server.
Each Web.config file applies configuration settings to its own
directory and all the sub directories below it.Web.config files in sub
directories can supply configuration
information in addition to that inherited from parent directories, and the
sub directory configuartion settings can modify or override settings defined
in parent directories.
What you need to do is,
Make your groupings based on directory structure.
For example if you have database connection information
affecting all the web applications you put that key in the Web.config file
in the parent directory in the highest
level of the web site so that all the sub directories(up to the lowest
hierarchy in the directory structure) can inherit that information.
But in some cases for some web applications you need
to override the configuation settings in the root directory or put new
settings,so put that in the directory of that application so that
all the sub directories under it can make use of it(these sub directories
can be associated with it's own iis applications),you may call it a group.
You don't need to have several web applications
sharing the same bin folder,as you create more and more applications this
will be tedious to manage and
if that iis application goes down, lot of your web applications will stop
working.
You can have a web application with its own virtual
directory and bin folder,but you can still inherit the configuration
information from the parent directories.
If your application runs on Windows 2003 you can take
advantage of using application pools and configure each application on its
own worker process that
provides process-level isolation.This isolation is very good because if
something happens to the application pool only that web application(s) is
affected.

Hope this helps.
Regards,
Marshal Antony
..NET Developer
<a style='text-decoration: underline;' href="http://www.dotnetmarshal.com" target="_blank">http://www.dotnetmarshal.com</a>





"BPearson" <anonymous DeleteThis @discussions.microsoft.com> wrote in message
news:BD1B2D62-0D3D-4222-8DBE-FB2263AB2217@microsoft.com...
  > Hello,
   >> I would like to have several sites share a single web.config file. To
accomplish this, I would point the root of these sites to the same folder.
Is there any reason why I might not want to do this? (IIS 5 or 6)
   >> In case you're wondering why I would do this, we have many web sites on a
single server, and there are groups of sites that need to share common
configuration information. I'd like to ease some administration by having
one web.config file for each of these "site groupings". There may be many
"site groupings", so I cannot use the machine.config file.
   >> An interesting side question: assuming that I do the above, is it ok to
have several web applications sharing a single bin folder? If that is an OK
solution, then I just might be able to avoid using the gac, any thoughts on
that?
   >> Thanks,
  > BPearson<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Multiple sites sharing single web.config file 
Back to top
Login to vote
dotnetmarshal

External


Since: Feb 09, 2004
Posts: 2



(Msg. 4) Posted: Tue Feb 10, 2004 4:25 pm
Post subject: Re: Multiple sites sharing single web.config file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Bpearson,
I think as David pointed out you can do it by the location element
in the machine.config.
You may need to use the allowOverride="false" for the location element.
Also there is a location element in the Web.config which you can make use as
well in some cases.
Here is a link which explains it clearly.
<a style='text-decoration: underline;' href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;815174" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;EN-US;815174</a>
Hope this helps.
Regards,
Marshal Antony
..NET eveloper
<a style='text-decoration: underline;' href="http://www.dotnetmarshal.com" target="_blank">http://www.dotnetmarshal.com</a>




"BPearson" <anonymous.RemoveThis@discussions.microsoft.com> wrote in message
news:75E7CC1D-5BB8-443C-8BDA-B111603877C5@microsoft.com...
 > Thank you for the reply. I do understand the cascading nature of the
config files - but here is my dilemna:
 >
 > machine.config allows me to specify configs that apply to the entire
machine.
 > web.config allows me to specify configs that apply to one web site (or to
more granular directories/virtual directories below).
 >
 > BUT, I need something in between. I want a config file that will apply to
x web sites on the machine.
 >
 > eg - I need a multiweb.config that allows me to specify configs for web
sites X, Y, and Z. I might have 1000 websites on a machine, and I need one
config file that applies to 100 of them, another config that applies to
another 200 and so on. Having web applications below the website level is
not good enough, each web application must be a separate web site.
 >
 > In my original post, I've gave a description of how I want to accomplish
this, and I can't think of any negative consequences .... does anyone out
there know of some reason why my proposed solution to this problem will not
work? Or maybe someone knows that this is OK to do, and wants to say "go
for it!"?
 >
 > Thanks!
 > BPearson
 >
 > ----- Marshal Antony wrote: -----
 >
 > Hi BPearson,
 > I think it is important for you to understand how multiple
Web.config
 > files can appear in multiple directories on a ASP.NET Web application
 > server.
 > Each Web.config file applies configuration settings to
its own
 > directory and all the sub directories below it.Web.config files in
sub
 > directories can supply configuration
 > information in addition to that inherited from parent directories,
and the
 > sub directory configuartion settings can modify or override settings
defined
 > in parent directories.
 > What you need to do is,
 > Make your groupings based on directory structure.
 > For example if you have database connection
information
 > affecting all the web applications you put that key in the Web.config
file
 > in the parent directory in the highest
 > level of the web site so that all the sub directories(up to the
lowest
 > hierarchy in the directory structure) can inherit that information.
 > But in some cases for some web applications
you need
 > to override the configuation settings in the root directory or put
new
 > settings,so put that in the directory of that application so that
 > all the sub directories under it can make use of it(these sub
directories
 > can be associated with it's own iis applications),you may call it a
group.
 > You don't need to have several web
applications
 > sharing the same bin folder,as you create more and more applications
this
 > will be tedious to manage and
 > if that iis application goes down, lot of your web applications will
stop
 > working.
 > You can have a web application with its own
virtual
 > directory and bin folder,but you can still inherit the configuration
 > information from the parent directories.
 > If your application runs on Windows 2003 you can take
 > advantage of using application pools and configure each application
on its
 > own worker process that
 > provides process-level isolation.This isolation is very good because
if
 > something happens to the application pool only that web
application(s) is
 > affected.
 >
 > Hope this helps.
 > Regards,
 > Marshal Antony
 > ..NET Developer
<font color=purple> > <a style='text-decoration: underline;' href="http://www.dotnetmarshal.com</font" target="_blank">http://www.dotnetmarshal.com</font</a>>
 >
 >
 >
 >
 >
 > "BPearson" <anonymous.RemoveThis@discussions.microsoft.com> wrote in message
 > news:BD1B2D62-0D3D-4222-8DBE-FB2263AB2217@microsoft.com...
  > > Hello,
   > >> I would like to have several sites share a single web.config file.
To
 > accomplish this, I would point the root of these sites to the same
folder.
 > Is there any reason why I might not want to do this? (IIS 5 or 6)
   > >> In case you're wondering why I would do this, we have many web
sites on a
 > single server, and there are groups of sites that need to share
common
 > configuration information. I'd like to ease some administration by
having
 > one web.config file for each of these "site groupings". There may
be many
 > "site groupings", so I cannot use the machine.config file.
   > >> An interesting side question: assuming that I do the above, is it
ok to
 > have several web applications sharing a single bin folder? If that
is an OK
 > solution, then I just might be able to avoid using the gac, any
thoughts on
 > that?
   > >> Thanks,
  > > BPearson
 >
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Multiple sites sharing single web.config file 
Back to top
Login to vote
mvkazit

External


Since: Feb 10, 2004
Posts: 1



(Msg. 5) Posted: Tue Feb 10, 2004 8:46 pm
Post subject: Re: Multiple sites sharing single web.config file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You can try to use "junction" utility from <a style='text-decoration: underline;' href="http://www.sysinternals.com" target="_blank">http://www.sysinternals.com</a>


"BPearson" <anonymous.DeleteThis@discussions.microsoft.com> wrote in message
news:BD1B2D62-0D3D-4222-8DBE-FB2263AB2217@microsoft.com...
 > Hello,
 >
 > I would like to have several sites share a single web.config file. To
accomplish this, I would point the root of these sites to the same folder.
Is there any reason why I might not want to do this? (IIS 5 or 6)
 >
 > In case you're wondering why I would do this, we have many web sites on a
single server, and there are groups of sites that need to share common
configuration information. I'd like to ease some administration by having
one web.config file for each of these "site groupings". There may be many
"site groupings", so I cannot use the machine.config file.
 >
 > An interesting side question: assuming that I do the above, is it ok to
have several web applications sharing a single bin folder? If that is an OK
solution, then I just might be able to avoid using the gac, any thoughts on
that?
 >
 > Thanks,
 > BPearson<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Multiple sites sharing single web.config file 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]