2

According to the MSDN documentation, configSource is supported on Windows Server 2003 SP2. However, when I try to access a setting using the following syntax:

System.Configuration.ConfigurationManager.AppSettings["SettingName"];

then null is returned. However, the same app works properly on Windows 7 and Windows XP (i.e. AppSettings["SettingName"] returns the expected value when using configSource).

The file that configSource points to exists for sure, since I copied the entire application directory from Windows 7 to Server 2003 for testing.

Any ideas?

Mark Carpenter
  • 17,445
  • 22
  • 96
  • 149
  • 1
    You've tried this with permissions wide open and/or running the app as an admin? (just to help narrow things down; not advocating for this!) – Michael Haren Jul 23 '10 at 15:26

1 Answers1

3

You have an incomplete application manifest file. You need to add the "assemblyIdentity" element. Details here. There is also an MS Connect bug here.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
GuyBehindtheGuy
  • 1,368
  • 2
  • 17
  • 36