user.config deal

  • Thread starter Thread starter Harry Simpson
  • Start date Start date
H

Harry Simpson

Trying to redirect to the local.config file for a few app settings as in:

In the regular Web.config:
<?xml version="1.0" standalone="yes"?>
<configuration>
<appSettings file="local.config">
<add key="ServerIP" value="10.0.0.32" />
<add key="SQLServerIP" value="10.0.0.32" />
........etc etc etc.......

Then local.config consist entirely of just the following:
<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
<add key="ServerIP" value="10.0.0.62" />
<add key="SQLServerIP" value="10.0.0.62" />
</appSettings>

Therefore, when i run the app i'd expect that the values for ServerIP and
SQLServerIP would be "10.0.0.62"

Instead it looks like the app gets to the point where it's trying to read
the context application variable and gets no further.
Any idea what may be blowing up here? Does this work with cookieless
sessions etc.

Stumped

TIA
Harry
 
According to MSDN, the file attribute of your web.config's appSettings element is the "relative file name

Have you made sure you have put local.config in the same directory as web.config? What does your directory structure look like? Lots of branches


----- Harry Simpson wrote: ----

Trying to redirect to the local.config file for a few app settings as in

In the regular Web.config
<?xml version="1.0" standalone="yes"?><configuration><appSettings file="local.config"><add key="ServerIP" value="10.0.0.32" /><add key="SQLServerIP" value="10.0.0.32" /
........etc etc etc......

Then local.config consist entirely of just the following
<?xml version="1.0" encoding="utf-8" ?><appSettings><add key="ServerIP" value="10.0.0.62" /><add key="SQLServerIP" value="10.0.0.62" /></appSettings

Therefore, when i run the app i'd expect that the values for ServerIP an
SQLServerIP would be "10.0.0.62

Instead it looks like the app gets to the point where it's trying to rea
the context application variable and gets no further
Any idea what may be blowing up here? Does this work with cookieles
sessions etc

Stumpe

TI
Harr
 
Harry Simpson said:
Trying to redirect to the local.config file for a few app settings as in: .....

Instead it looks like the app gets to the point where it's trying to read
the context application variable and gets no further.

It "looks like" it? Could you be more specific? Is there an exception? If
so, please post the details of the exception.

It's hard to tell you how to fix it if you don't say what's wrong!
 
Thanks John for that insight....if i knew what was wrong i wouldn't be
asking the question.

The loaded screen's textbox started flashing like the page was in an endless
repost loop.

Anyway, i rebooted the box and it started working. Still don't know what
was wrong or any better way to describe it to you.

thanks....

Harry
 
Back
Top