[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Re: ASP.NET Runtime and forcing ConfigurationSettings to load

Rick Strahl

8/6/2003 8:12:00 PM

Well I found the problem...

The issue here is not that ASP.Net runtime isn't firing the startup code,
but rather that it is ignoring the full path to a configuration file set in
AppDomainSetup. Although I point at a Web.Config of the original application
it will only use one that is set up in the new ASP.Net hosting directory. So
the only solution I found is to copy web.config at least the section I need
out of it.

Incidentally, it's not possible to use the Web.Config from the Web site.
Some of the configuration settings inside of the main Web app cause the
separate Asp.Net runtime to not load - only a simple Web.Config seems to
work. <shrug>

this sucks, since it's not quite obvious what inside of web.config is
causing it to not work.

+++ Rick---

--

Rick Strahl
West Wind Technologies
http://www.west...
http://www.west...wwHelp
----------------------------------
Making waves on the Web


"Rick Strahl [MVP]" <rickstrahl@hotmail.com> wrote in message
news:erhDAhkWDHA.572@TK2MSFTNGP11.phx.gbl...
> Hi all,
>
> I'm hosting my own instance of the HTTP runtime in ASP.Net to perform
> various
> text merge operations for emails and other document generation tasks. All
> is working well except:
>
> My runtime host app is not firing the ConfigurationSettings.AppSettings
> which I use for various important pieces of information like
> connectionstrings
> etc. In addition, I also have some Static objects whose constructors fire
> when the ASP.Net app starts and when web.config is loaded or modified. But
> this is also not happening in the separate runtime instance (but is in the
> main ASP.Net app).
>
> I suspect I'm missing some piece of the start up code puzzle in the
ASP.Net
> runtime engine.
>
> The runtime host app is sitting in a new domain that points at a shared
> Web.Config file (for the main Web app). Everything looks Ok - I can run
> pages in the new runtime instance fine and I can see that all the paths
> are pointing at the right places including
>
> AppDomain.CurrentDomain.SetupInformation.ConfigurationFile
>
>
> I've written up most of this stuff and posted the bits
> related to the runtime so far at:
>
> http://www.west...articles.asp
>
> So if anybody is interested check out the article and download from there.
>
> Any help with this latest issue would be appreciated.
>
> +++ Rick ---
>
> --
>
> Rick Strahl [C# MVP]
> West Wind Technologies
> http://www.west...
> http://www.west...wwHelp
> ----------------------------------
> Making waves on the Web
>
>
>