当调用ConfigurationManager.AppSettings时,出现“配置系统未能初始化”异常,有可能是app.confing或者web.config 文件格式错误,请检查配置文件,配置文件格式例子:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="JihuaKey" value="JihuaValue" /> <add key="JihuaURL" value="jihua.cnblogs.com" /> </appSettings> </configuration>
又如无内容例子:
<?xml version="1.0" encoding="utf-8" ?> <configuration> </configuration>