473,224 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

Referencing the Machine Config file

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
Nov 18 '05 #1
6 2448
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
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
From: mi*****@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: <21**************************@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: gr**********@google.com
NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
e.de!fr.ip.ndsoftware.net!proxad.net!postnews2.goo gle.com!not-for-mailXref: 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


Nov 18 '05 #2
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.ConfigurationSet tings.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
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
From: mi*****@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: <21**************************@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: gr**********@google.com
NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
e.de!fr.ip.ndsoftware.net!proxad.net!postnews2.goo gle.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


Nov 18 '05 #3
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
ja******@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==?=" <Da****@discussions.microsoft.com>
| References: <21**************************@posting.google.com >
<Dj**************@cpmsftngxa06.phx.gbl>
| Subject: RE: Referencing the Machine Config file
| Date: Tue, 5 Oct 2004 08:45:05 -0700
| Lines: 79
| Message-ID: <5E**********************************@microsoft.co m>
| 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.ConfigurationSet tings.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
| > ja******@online.microsoft.com
| >
| > This post is provided "AS-IS" with no warranties and confers no rights.
| >
| > --------------------
| > >From: mi*****@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: <21**************************@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: gr**********@google.com
| > >NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
| > >Path:
| >
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
| > e.de!fr.ip.ndsoftware.net!proxad.net!postnews2.goo gle.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
| > >
| >
| >
|

Nov 18 '05 #4
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
ja******@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==?=" <Da****@discussions.microsoft.com>
| References: <21**************************@posting.google.com >
<Dj**************@cpmsftngxa06.phx.gbl>
| Subject: RE: Referencing the Machine Config file
| Date: Tue, 5 Oct 2004 08:45:05 -0700
| Lines: 79
| Message-ID: <5E**********************************@microsoft.co m>
| 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.ConfigurationSet tings.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
| > ja******@online.microsoft.com
| >
| > This post is provided "AS-IS" with no warranties and confers no rights.
| >
| > --------------------
| > >From: mi*****@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: <21**************************@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: gr**********@google.com
| > >NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
| > >Path:
| >
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
| > e.de!fr.ip.ndsoftware.net!proxad.net!postnews2.goo gle.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
| > >
| >
| >
|

Nov 18 '05 #5
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
ja******@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==?=" <Da****@discussions.microsoft.com>
| References: <21**************************@posting.google.com >
<Dj**************@cpmsftngxa06.phx.gbl>
| Subject: RE: Referencing the Machine Config file
| Date: Tue, 5 Oct 2004 08:45:05 -0700
| Lines: 79
| Message-ID: <5E**********************************@microsoft.co m>
| 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.ConfigurationSet tings.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
| > ja******@online.microsoft.com
| >
| > This post is provided "AS-IS" with no warranties and confers no rights.
| >
| > --------------------
| > >From: mi*****@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: <21**************************@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: gr**********@google.com
| > >NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
| > >Path:
| >
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
| > e.de!fr.ip.ndsoftware.net!proxad.net!postnews2.goo gle.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
| > >
| >
| >
|

Nov 18 '05 #6
Dave,

No offense at all. I've been out of the office for about a week and just
haven't responded to any posts.

I suspect that what you're seeing here is some metabase corruption in IIS.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@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: AcSsfxIKXIfUCODbQgKIrt5wGT7FBA==
| X-WBNR-Posting-Host: 142.245.193.83
| From: "=?Utf-8?B?RGF2aWQgTA==?=" <Da****@discussions.microsoft.com>
| References: <21**************************@posting.google.com >
<Dj**************@cpmsftngxa06.phx.gbl>
<5E**********************************@microsoft.co m>
<g2**************@cpmsftngxa06.phx.gbl>
<C5**********************************@microsoft.co m>
| Subject: RE: Referencing the Machine Config file
| Date: Thu, 7 Oct 2004 08:05:23 -0700
| Lines: 148
| Message-ID: <FD**********************************@microsoft.co m>
| 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!TK2MSFTNGP08.phx.gbl!TK2MSFTN GXA03.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:266309
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| 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
| > > ja******@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==?=" <Da****@discussions.microsoft.com>
| > > | References: <21**************************@posting.google.com >
| > > <Dj**************@cpmsftngxa06.phx.gbl>
| > > | Subject: RE: Referencing the Machine Config file
| > > | Date: Tue, 5 Oct 2004 08:45:05 -0700
| > > | Lines: 79
| > > | Message-ID: <5E**********************************@microsoft.co m>
| > > | 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.ConfigurationSet tings.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
| > > | > ja******@online.microsoft.com
| > > | >
| > > | > This post is provided "AS-IS" with no warranties and confers no
rights.
| > > | >
| > > | > --------------------
| > > | > >From: mi*****@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: <21**************************@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: gr**********@google.com
| > > | > >NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
| > > | > >Path:
| > > | >
| > >
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
| > > | >
e.de!fr.ip.ndsoftware.net!proxad.net!postnews2.goo gle.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
| > > | > >
| > > | >
| > > | >
| > > |
| > >
| > >
|

Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris | last post by:
I have seen the posts on various places on the internet about .NET framework mismatch issues and I don't think that is my problem. ; ) When I execute the following C++.NET code: String...
9
by: Marina Anufreichik | last post by:
Hi, After deploymnet web application on web server I can access page on local machine and login fine but when I'm trying to access web site from remote machine I can see login page, but when I'm...
12
by: Mark Broadbent | last post by:
Hi guys, just going through remoting at the moment and a couple of questions relating to .net in general has surfaced. Firstly I have seen in the designer that for the namespace and many of its...
1
by: Ritu | last post by:
How to store connection strings in machine.config?What are the advantages of storing it in the machine.config file.Can u provide me with the information regarding accessibility of machine.config...
0
by: Roy Chastain | last post by:
I have a simple page or two and a simple global.asax file that loads some configuration from the web.config file. I developed this on a Windows XP box with framework version 1.1 installed. I run...
5
by: John | last post by:
Hi I am trying to get web reference to my first (!) web service which is on a remote host. I am getting the following error; Server Error in '/' Application. Runtime Error Description: An...
11
by: TARUN | last post by:
Hello All I need to ask about the configuration file in .NET, There are Two config File 1. Web Config 2. Machine config I understand the the usage of Web config , but not able to understand...
1
by: Henry Stock | last post by:
I am having trouble referencing a theme in my ASP.NET project. I was following a model that allowed for multiple themes. So The theme that I have is stored in named "Base" under the App_Theme...
5
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a app that uses several membership/role providers. I can list these Providers with the code: Dim rootWebConfig1 As Configuration rootWebConfig1 =...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.