开发者

Problem accessing AppSettings via configSource in Windows Server 2003

开发者 https://www.devze.com 2023-01-09 02:46 出处:网络
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:

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 confi开发者_JAVA技巧gSource).

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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号