Hi Chris,
How do I find the path of machine.config? I want to read the
processmodel from machine.config.
Thanks & Regards
Sunil
"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message news:<#wgTL$>...
> You can just grab the value directly by reading the XML:
>
> System.Xml.XmlDocument myConfig = new XmlDocument();
>
> myConfig.Load(Server.MapPath("web.config"));
>
> System.Xml.XmlNodeList pmNodeList =
> myConfig.GetElementsByTagName("processModel");
>
> string responseDeadlockInterval =
> pmNodeList[0].Attributes["responseDeadlockInterval"].Value;
>
> ...
>
>
> --
> Chris Jackson
> Software Engineer
> Microsoft MVP - Windows Client
> Windows XP Associate Expert
> --
> More people read the newsgroups than read my email.
> Reply to the newsgroup for a faster response.
> (Control-G using Outlook Express)
> --
>
> "Jack Wright" <> wrote in message
> news: m...
> > Dear All,
> > I would like to read the processModel from machine.config.
> > The following is code I have writte
> > Dim hConfig As Object =
> > ConfigurationSettings.GetConfig("system.web/processModel")
> > But if I try to typecast hConfig with
> > System.Web.Configuration.ProcessModelConfig I get the following error:
> > 'System.Web.Configuration.ProcessModelConfig' is not accessible in
> > this context because it is 'Private'.
> >
> > I would like to access attribute 'responseDeadlockInterval'.
> >
> > Please help.
> >
> > TALIA
> > Many Regards
> > Sunil
|