RE: Referencing the Machine Config file

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: David L (DavidL_at_discussions.microsoft.com)
Date: 10/07/04


Date: Thu, 7 Oct 2004 08:05:23 -0700

Jim, hope I didn't offend you with my comment.

In any case, we've had an unsatisfying resolution to this problem. We
created a new web site in a vroot that just read from machine.config. When we
installed this, it worked. We created another vroot to point back to the
original root dir that was having the problems, and it worked. We then tried
to go directly to the root again and it worked. The machine hadn't been
rebooted and we had done several iisresets previously.

I don't see how creating the new vroot could have resolved it. So, it
remains a mystery to us.

Thanks for your help.

Dave

"David L" wrote:

> Yes. Remember I said it all works fine if I compile the web app against
> Framework 1.1 SP1 with no other changes.
>
> "Jim Cheshire [MSFT]" wrote:
>
> > Did you place the <appSettings> element BELOW the <configSections> section
> > in the machine.config? You should.
> >
> > Jim Cheshire [MSFT]
> > MCP+I, MCSE, MCSD, MCDBA
> > ASP.NET Developer Support
> > jamesche@online.microsoft.com
> >
> > This post is provided "AS-IS" with no warranties and confers no rights.
> >
> >
> > --------------------
> > | Thread-Topic: Referencing the Machine Config file
> > | thread-index: AcSq8ki50U2quUG6SxWR1Az+4mYlpw==
> > | X-WBNR-Posting-Host: 142.245.193.83
> > | From: "=?Utf-8?B?RGF2aWQgTA==?=" <DavidL@discussions.microsoft.com>
> > | References: <2164be2f.0408050846.4fe69680@posting.google.com>
> > <DjVOmtxeEHA.3356@cpmsftngxa06.phx.gbl>
> > | Subject: RE: Referencing the Machine Config file
> > | Date: Tue, 5 Oct 2004 08:45:05 -0700
> > | Lines: 79
> > | Message-ID: <5EE1C310-3EBF-41E9-8828-B8AD45E861F5@microsoft.com>
> > | MIME-Version: 1.0
> > | Content-Type: text/plain;
> > | charset="Utf-8"
> > | Content-Transfer-Encoding: 7bit
> > | X-Newsreader: Microsoft CDO for Windows 2000
> > | Content-Class: urn:content-classes:message
> > | Importance: normal
> > | Priority: normal
> > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> > | Newsgroups: microsoft.public.dotnet.framework.aspnet
> > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
> > | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:265716
> > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> > |
> > | I'm having a similar problem. I have an ASP.NET web app compiled against
> > | Framework 1.1 and deployed. When we update the server to use 1.1 SP1 we
> > can
> > | no longer read from the machine.config, only web.config. It appears to be
> > | fine if we recompile against 1.1 SP1, but being in a production
> > environment,
> > | this isn't an option.
> > |
> > | The simplest steps for use to reproduce, just adds this code to our .aspx
> > | start-up page:
> > TestValue=<%=System.Configuration.ConfigurationSettings.AppSettings["TestKey
> > "]%>
> > |
> > | The resultant page just has "TestValue="
> > | The machine.config has the following:
> > | <appSettings>
> > | <add key="TestKey" value="TestValue" />
> > | </appSettings>
> > |
> > | Again, if we put this in the web.config, we get the value properly
> > | ("TestValue=TestValue")
> > |
> > | Thanks for any help you can offer.
> > |
> > | Dave
> > |
> > | "Jim Cheshire [MSFT]" wrote:
> > |
> > | > Mikey,
> > | >
> > | > Can you give us some indication as to what happens when you run your
> > code?
> > | > Be as specific as possible.
> > | >
> > | > Jim Cheshire [MSFT]
> > | > MCP+I, MCSE, MCSD, MCDBA
> > | > Microsoft Developer Support
> > | > jamesche@online.microsoft.com
> > | >
> > | > This post is provided "AS-IS" with no warranties and confers no rights.
> > | >
> > | > --------------------
> > | > >From: michdoh@yahoo.com (Mikey_Doc)
> > | > >Newsgroups: microsoft.public.dotnet.framework.aspnet
> > | > >Subject: Referencing the Machine Config file
> > | > >Date: 5 Aug 2004 09:46:31 -0700
> > | > >Organization: http://groups.google.com
> > | > >Lines: 18
> > | > >Message-ID: <2164be2f.0408050846.4fe69680@posting.google.com>
> > | > >NNTP-Posting-Host: 212.250.152.5
> > | > >Content-Type: text/plain; charset=ISO-8859-1
> > | > >Content-Transfer-Encoding: 8bit
> > | > >X-Trace: posting.google.com 1091724391 22812 127.0.0.1 (5 Aug 2004
> > | > 16:46:31 GMT)
> > | > >X-Complaints-To: groups-abuse@google.com
> > | > >NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
> > | > >Path:
> > | >
> > cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
> > | > e.de!fr.ip.ndsoftware.net!proxad.net!postnews2.google.com!not-for-mail
> > | > >Xref: cpmsftngxa06.phx.gbl
> > microsoft.public.dotnet.framework.aspnet:252373
> > | > >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> > | > >
> > | > >Hi
> > | > >
> > | > >We are running cms 2002, Framework 1.0 with Visual studio 2002. We
> > | > >have just upgraded to Framework 1.1 and visual studio 2003.
> > | > >
> > | > >All of our database connection strings are stored within the machine
> > | > >config, this was necessary as our web site has 4 environments and the
> > | > >database server has a different name in each.
> > | > >
> > | > >Since the upgrade the applications can't read the strings in the
> > | > >machine config (previously it was fine). If I copy the strings into
> > | > >the web config the apps are fine but this is not practical as it would
> > | > >involve a different web config on each machine (Could be easy to mess
> > | > >up)
> > | > >
> > | > >Any thoughts are greatly appreciated
> > | > >
> > | > >Mikey
> > | > >
> > | >
> > | >
> > |
> >
> >



Relevant Pages

  • RE: error deploying web service
    ... > is that the web site or vroot itself has to be configured as an ASP.Net ... Only an administrator can add assemblies to the GAC, ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: error deploying web service
    ... the files you see under an IIS vroot. ... is that the web site or vroot itself has to be configured as an ASP.Net ... Only an administrator can add assemblies to the GAC, ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: New Web Page in IIS 6
    ... When you say you created a new web site, do you mean you added an ASMX page ... Or did you use IIS manager to create a new ... web site VROOT, and put your new pages under there? ...
    (microsoft.public.dotnet.framework.aspnet.webservices)