[Mono-list] AppSettings loading problem ?
Gonzalo Paniagua Javier
gonzalo at ximian.com
Thu Sep 8 11:34:41 EDT 2005
On Thu, 2005-09-08 at 16:12 +0200, Stéphane Rodrigues wrote:
> Hello,
>
> When I start XSP, my webservice written in C# can't access to my
> settings. But when I modify the file mod-mono-server.exe.config,
> settings seems to be reloaded and I can retrieve them.
>
> Is there a way to load settings when XSP starts ?
>
> My config file :
>
> <?xml version="1.0" encoding="utf-8"?>
> <configuration>
> <appSettings>
> <add key="DBPath" value="E:\\Mono\\Mono.yap"/>
> <add key="MonoApplications" value="/:." />
> <add key="MonoServerDefaultIndexFiles"
> value="index.aspx, Default.aspx, default.aspx, index.html,
> index.htm" />
> </appSettings>
> </configuration>
If you store those settings in mod-mono-server.exe.config, those will
not be available for your web service. Why? Because each ASP.NET
application run by mod-mono-server lives in its own AppDomain and have
web.config as the configuration file. So if you copy those settings over
to a web.config file, it will work fine.
-Gonzalo
More information about the Mono-list
mailing list