[Mono-list] Sharing Web.config among webapps/services

Joe Audette joe_audette@yahoo.com
Tue, 2 Nov 2004 11:52:25 -0800 (PST)


--0-602633847-1099425145=:45142
Content-Type: text/plain; charset=us-ascii

Another way to do it is in the Web.config, reference another config file like this
Web.config:
<appSettings file="../MyWeb.config">
 
Then the settings in the referenced MyWeb.config will take precedence over the settings in the calling Web.config 

Not sure if that helps but it does work
 
Joe Audette

Mariano Alarcon <marianoa@itcsoluciones.com> wrote:
Yes, but maybe WebApps have Web.config files of their own which I would 
like to take precedence. If I do links I only get one Web.config file.

Dan Maltes wrote:

> Perhaps file links would work?
>
>-Dan
>
>-----Original Message-----
>From: mono-list-admin@lists.ximian.com
>[mailto:mono-list-admin@lists.ximian.com] On Behalf Of Mariano Alarcon
>Sent: Tuesday, November 02, 2004 11:50 AM
>To: mono-list@ximian.com
>Subject: [Mono-list] Sharing Web.config among webapps/services
>
>Hello,
>
>Is it posible to set up xsp/mod_mono so they can share the same Web.config
>file? So far I have been able to make this happen but it requires that I
>move all the codebehind binaries to the main directory. 
>For example I tried:
>
>|
>+-MainDir
> |
> +- Web.config (to be shared by WebApp1 and WebApp2)
> |
> +- WebApp1
> | |
> | +- WebApp1.asmx
> | |
> | +- bin
> | |
> | +- WebApp1.dll
> |
> +- WebApp2
> |
> +- WebApp2.asmx
> |
> +- bin
> |
> + WebApp2.dll
>
>With this configuration if I point my xsp to MainDir I get the following:
>
>Server error in '/' application
>
>Type WebApp.WebApp1 not found.
>Description: Error processing request.
>
>Error Message: HTTP 500. Type WebApp.WebApp1 not found.
>
>Starting two xsps at /WebApp1 and /WebApp2 deals with the error but I do not
>get the common settings in Web.config. It also works if I move WebApp1.dll
>and WebApp2.dll to a /bin directory under MainDir but I was hoping I could
>keep the structure like the example above.
>
>Is this possible?
>
>Thanks.
>
>_______________________________________________
>Mono-list maillist - Mono-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
>
> 
>

-- 
Mariano Alarcón
ITC Soluciones

_______________________________________________
Mono-list maillist - Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


joe_audette@yahoo.com
http://www.joeaudette.com
http://www.mojoportal.com
--0-602633847-1099425145=:45142
Content-Type: text/html; charset=us-ascii

<DIV>Another way to do it is in the Web.config, reference another config file like this</DIV>
<DIV>Web.config:</DIV>
<DIV><FONT color=#0000ff size=2>&lt;</FONT><FONT color=#800000 size=2>appSettings</FONT><FONT color=#ff00ff size=2> </FONT><FONT color=#ff0000 size=2>file</FONT><FONT color=#0000ff size=2>="../MyWeb.config"&gt;</FONT></DIV>
<DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>&nbsp;</DIV></FONT>
<DIV></FONT>Then the settings in the referenced MyWeb.config will take precedence over the settings in the calling Web.config <BR></DIV>
<DIV>Not sure if that helps but it does work</DIV>
<DIV>&nbsp;</DIV>
<DIV>Joe Audette</DIV>
<DIV><BR><B><I>Mariano Alarcon &lt;marianoa@itcsoluciones.com&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Yes, but maybe WebApps have Web.config files of their own which I would <BR>like to take precedence. If I do links I only get one Web.config file.<BR><BR>Dan Maltes wrote:<BR><BR>&gt; Perhaps file links would work?<BR>&gt;<BR>&gt;-Dan<BR>&gt;<BR>&gt;-----Original Message-----<BR>&gt;From: mono-list-admin@lists.ximian.com<BR>&gt;[mailto:mono-list-admin@lists.ximian.com] On Behalf Of Mariano Alarcon<BR>&gt;Sent: Tuesday, November 02, 2004 11:50 AM<BR>&gt;To: mono-list@ximian.com<BR>&gt;Subject: [Mono-list] Sharing Web.config among webapps/services<BR>&gt;<BR>&gt;Hello,<BR>&gt;<BR>&gt;Is it posible to set up xsp/mod_mono so they can share the same Web.config<BR>&gt;file? So far I have been able to make this happen but it requires that I<BR>&gt;move all the codebehind binaries to the main directory. <BR>&gt;For example I tried:<BR>&gt;<BR>&gt;|<BR>&gt;+-MainDir<BR>&gt; |<BR>&gt; +
 -
 Web.config (to be shared by WebApp1 and WebApp2)<BR>&gt; |<BR>&gt; +- WebApp1<BR>&gt; | |<BR>&gt; | +- WebApp1.asmx<BR>&gt; | |<BR>&gt; | +- bin<BR>&gt; | |<BR>&gt; | +- WebApp1.dll<BR>&gt; |<BR>&gt; +- WebApp2<BR>&gt; |<BR>&gt; +- WebApp2.asmx<BR>&gt; |<BR>&gt; +- bin<BR>&gt; |<BR>&gt; + WebApp2.dll<BR>&gt;<BR>&gt;With this configuration if I point my xsp to MainDir I get the following:<BR>&gt;<BR>&gt;Server error in '/' application<BR>&gt;<BR>&gt;Type WebApp.WebApp1 not found.<BR>&gt;Description: Error processing request.<BR>&gt;<BR>&gt;Error Message: HTTP 500. Type WebApp.WebApp1 not found.<BR>&gt;<BR>&gt;Starting two xsps at /WebApp1 and /WebApp2 deals with the error but I do not<BR>&gt;get the common settings in Web.config. It also works if I move WebApp1.dll<BR>&gt;and WebApp2.dll to a /bin directory under MainDir but I was hoping I could<BR>&gt;keep the structure like the example above.<BR>&gt;<BR>&gt;Is this
 possible?<BR>&gt;<BR>&gt;Thanks.<BR>&gt;<BR>&gt;_______________________________________________<BR>&gt;Mono-list maillist - Mono-list@lists.ximian.com<BR>&gt;http://lists.ximian.com/mailman/listinfo/mono-list<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; <BR>&gt;<BR><BR>-- <BR>Mariano Alarcón<BR>ITC Soluciones<BR><BR>_______________________________________________<BR>Mono-list maillist - Mono-list@lists.ximian.com<BR>http://lists.ximian.com/mailman/listinfo/mono-list<BR></BLOCKQUOTE><BR><BR>joe_audette@yahoo.com<br>http://www.joeaudette.com<br>http://www.mojoportal.com
--0-602633847-1099425145=:45142--