473,732 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2473
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.c om (Mikey_Doc)
Newsgroups: microsoft.publi c.dotnet.framew ork.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**********@go ogle.com
NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-onlin
e.de!fr.ip.ndso ftware.net!prox ad.net!postnews 2.google.com!no t-for-mailXref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2523 73
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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=<%=Sy stem.Configurat ion.Configurati onSettings.AppS ettings["TestKey"]%>

The resultant page just has "TestValue= "
The machine.config has the following:
<appSettings>
<add key="TestKey" value="TestValu e" />
</appSettings>

Again, if we put this in the web.config, we get the value properly
("TestValue=Tes tValue")

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.c om (Mikey_Doc)
Newsgroups: microsoft.publi c.dotnet.framew ork.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**********@go ogle.com
NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
Path:

cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-onlin
e.de!fr.ip.ndso ftware.net!prox ad.net!postnews 2.google.com!no t-for-mail
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2523 73
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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: AcSq8ki50U2quUG 6SxWR1Az+4mYlpw ==
| X-WBNR-Posting-Host: 142.245.193.83
| From: "=?Utf-8?B?RGF2aWQgTA= =?=" <Da****@discuss ions.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************ *************** *******@microso ft.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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG XA03.phx.gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2657 16
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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=<%=Sy stem.Configurat ion.Configurati onSettings.AppS ettings["TestKey
"]%>
|
| The resultant page just has "TestValue= "
| The machine.config has the following:
| <appSettings>
| <add key="TestKey" value="TestValu e" />
| </appSettings>
|
| Again, if we put this in the web.config, we get the value properly
| ("TestValue=Tes tValue")
|
| 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.c om (Mikey_Doc)
| > >Newsgroups: microsoft.publi c.dotnet.framew ork.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**********@go ogle.com
| > >NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
| > >Path:
| >
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-onlin
| > e.de!fr.ip.ndso ftware.net!prox ad.net!postnews 2.google.com!no t-for-mail
| > >Xref: cpmsftngxa06.ph x.gbl
microsoft.publi c.dotnet.framew ork.aspnet:2523 73
| > >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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: AcSq8ki50U2quUG 6SxWR1Az+4mYlpw ==
| X-WBNR-Posting-Host: 142.245.193.83
| From: "=?Utf-8?B?RGF2aWQgTA= =?=" <Da****@discuss ions.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************ *************** *******@microso ft.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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG XA03.phx.gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2657 16
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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=<%=Sy stem.Configurat ion.Configurati onSettings.AppS ettings["TestKey
"]%>
|
| The resultant page just has "TestValue= "
| The machine.config has the following:
| <appSettings>
| <add key="TestKey" value="TestValu e" />
| </appSettings>
|
| Again, if we put this in the web.config, we get the value properly
| ("TestValue=Tes tValue")
|
| 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.c om (Mikey_Doc)
| > >Newsgroups: microsoft.publi c.dotnet.framew ork.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**********@go ogle.com
| > >NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
| > >Path:
| >
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-onlin
| > e.de!fr.ip.ndso ftware.net!prox ad.net!postnews 2.google.com!no t-for-mail
| > >Xref: cpmsftngxa06.ph x.gbl
microsoft.publi c.dotnet.framew ork.aspnet:2523 73
| > >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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: AcSq8ki50U2quUG 6SxWR1Az+4mYlpw ==
| X-WBNR-Posting-Host: 142.245.193.83
| From: "=?Utf-8?B?RGF2aWQgTA= =?=" <Da****@discuss ions.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************ *************** *******@microso ft.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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG XA03.phx.gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2657 16
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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=<%=Sy stem.Configurat ion.Configurati onSettings.AppS ettings["TestKey
"]%>
|
| The resultant page just has "TestValue= "
| The machine.config has the following:
| <appSettings>
| <add key="TestKey" value="TestValu e" />
| </appSettings>
|
| Again, if we put this in the web.config, we get the value properly
| ("TestValue=Tes tValue")
|
| 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.c om (Mikey_Doc)
| > >Newsgroups: microsoft.publi c.dotnet.framew ork.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**********@go ogle.com
| > >NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
| > >Path:
| >
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-onlin
| > e.de!fr.ip.ndso ftware.net!prox ad.net!postnews 2.google.com!no t-for-mail
| > >Xref: cpmsftngxa06.ph x.gbl
microsoft.publi c.dotnet.framew ork.aspnet:2523 73
| > >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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: AcSsfxIKXIfUCOD bQgKIrt5wGT7FBA ==
| X-WBNR-Posting-Host: 142.245.193.83
| From: "=?Utf-8?B?RGF2aWQgTA= =?=" <Da****@discuss ions.microsoft. com>
| References: <21************ **************@ posting.google. com>
<Dj************ **@cpmsftngxa06 .phx.gbl>
<5E************ *************** *******@microso ft.com>
<g2************ **@cpmsftngxa06 .phx.gbl>
<C5************ *************** *******@microso ft.com>
| Subject: RE: Referencing the Machine Config file
| Date: Thu, 7 Oct 2004 08:05:23 -0700
| Lines: 148
| Message-ID: <FD************ *************** *******@microso ft.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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGXA03.phx. gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2663 09
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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: AcSq8ki50U2quUG 6SxWR1Az+4mYlpw ==
| > > | X-WBNR-Posting-Host: 142.245.193.83
| > > | From: "=?Utf-8?B?RGF2aWQgTA= =?=" <Da****@discuss ions.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************ *************** *******@microso ft.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.publi c.dotnet.framew ork.aspnet
| > > | NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
| > > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG XA03.phx.gbl
| > > | Xref: cpmsftngxa06.ph x.gbl
microsoft.publi c.dotnet.framew ork.aspnet:2657 16
| > > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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=<%=Sy stem.Configurat ion.Configurati onSettings.AppS ettings["TestKey
| > > "]%>
| > > |
| > > | The resultant page just has "TestValue= "
| > > | The machine.config has the following:
| > > | <appSettings>
| > > | <add key="TestKey" value="TestValu e" />
| > > | </appSettings>
| > > |
| > > | Again, if we put this in the web.config, we get the value properly
| > > | ("TestValue=Tes tValue")
| > > |
| > > | 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.c om (Mikey_Doc)
| > > | > >Newsgroups: microsoft.publi c.dotnet.framew ork.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**********@go ogle.com
| > > | > >NNTP-Posting-Date: Thu, 5 Aug 2004 16:46:31 +0000 (UTC)
| > > | > >Path:
| > > | >
| > >
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-onlin
| > > | >
e.de!fr.ip.ndso ftware.net!prox ad.net!postnews 2.google.com!no t-for-mail
| > > | > >Xref: cpmsftngxa06.ph x.gbl
| > > microsoft.publi c.dotnet.framew ork.aspnet:2523 73
| > > | > >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
4387
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 *ipAddress = S""; IDictionary *server_config = dynamic_cast<IDictionary*>(ConfigurationSettings::GetConfig("ServerAddress") ); ipAddress = dynamic_cast<String*>(server_config->get_Item(S"IP"));
9
3004
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 trying to login with correct credentials it give me error: Server Error in '/PDVMgr' Application. ----------------------------------------------------------------------------
12
1960
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 associated classes of System.Runtime.Remoting are available, but certain ones are not. A reference to System.Runtime.Remoting needs to be added to make available all the unavailable ones. Now although I (think) understand the concept that an...
1
5054
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 file,meaning thereby,who can access thisfile and who cannot.An early reply would be appreciated.
0
1501
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 it on a 2003 box with both version 1.0 and 1.1 installed. This appears to work. When move the page and code to my clients hosting service (Earthlink) which only supports version 1.0 of the framework, I get the error below. I know that my...
5
1587
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 application error occurred on the server. The current custom error settings for this application prevent the details of the application
11
3450
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 the usage of Machine config. I read in the article that you can also write your database connection string in Machine Config
1
2364
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 folder that is stored at the root of my project folder. It is really the one I want to use for all pages, so I thought I would reference it in the web.config file: <pages masterPageFile="~/Masters/SiteTemplate.master"
5
2858
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 = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath) Dim section As New MembershipSection section = rootWebConfig1.GetSection("system.web/membership")
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.