473,378 Members | 1,413 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,378 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 2451
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.