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

Dan Maltes dan@astusa.com
Thu, 4 Nov 2004 11:02:18 -0500


Hmm, should file path be relative to dll or to the web apps web.config?  =
I'm
not sure, but try file=3D"../Web.config"
And make certain case is correct.

-Dan

-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com] On Behalf Of Mariano Alarcon
Sent: Thursday, November 04, 2004 9:42 AM
To: Joe Audette
Cc: mono-list@ximian.com
Subject: Re: [Mono-list] Sharing Web.config among webapps/services

Thanks Joe,

I tried your suggestion, but it did not work. I created a Web.config =
file
inside WebApp1 and added the following:

<appSettings file=3D"../../Web.config">
    <add key=3D"myKey" value=3D"somePrivateValue" /> </appSettings>

I can read the value of "myKey" but not the the settings defined in
../../Web.config. Do you mean that it works for you with IIS or mono?

If I point xsp to mainDir I can read both values but I still have the
problem that I have to move all the dlls up to mainDir...


Joe Audette wrote:

> Another way to do it is in the Web.config, reference another config=20
> file like this
> Web.config:
> <appSettings file=3D"../MyWeb.config">
> =20
> Then the settings in the referenced MyWeb.config will take precedence=20
> over the settings in the calling Web.config
> Not sure if that helps but it does work
> =20
> 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
>     >
>     >
>     >
>     >
>     >
>     >
>
>     --=20
>     Mariano Alarc=F3n
>     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=20


--=20
Mariano Alarc=F3n
ITC Soluciones

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