I've searched the web for a solution to this problem. Surprisingly, no
problem/solution has been posted yet.
We can read application configuration information fine when our
asp.net application runs on a Windows 2000 server. But when we run
this same application from Windows 2003, we can't read any application
configuration.
The code in question is this (in default.aspx):
private void Page_Load(object sender, EventArgs e)
{
NameValueCollection sAll = ConfigurationSettings.AppSettings;
foreach (string s in sAll.AllKeys)
{
Response.Write ("Key: " + s + " Value: " + sAll[s] + "<br>");
}
Response.End ();
}
In web.config, we have this:
<appSettings>
<add key="key" value="value"/>
</appSettings>
This code correctly writes the following to the browser on Windows
2000:
Key: key Value: value
On Windows Server 2003 nothing is written.
We configured w3wp.exe (asp.net worker process on Windows 2003) to run
with administrator access, but this didn't fix things. We changed the
ACL of web.config to grant various different AD ids read/write
privileges, but this also didn't solve the problem.
Anybody have any suggestions?
Thanks,
Jared