引用web service时,出现无法识别的配置节点applicationSettings
昨天把项目部署到正式环境时,原来引用web service,在web.config中的节点,出现无法识别的配置节点<applicationSettings>的问题
ApplicationSetting 节点的内容:
<applicationSettings>
<TrafficPlanUI.Properties.Settings>
<setting name="TrafficPlanUI_WebReference_UserAdminService" serializeAs="String">
<value>http://10.132.100.1:8989/Jws/UserAdmin.jws</value>
</setting>
</TrafficPlanUI.Properties.Settings>
</applicationSettings>
<TrafficPlanUI.Properties.Settings>
<setting name="TrafficPlanUI_WebReference_UserAdminService" serializeAs="String">
<value>http://10.132.100.1:8989/Jws/UserAdmin.jws</value>
</setting>
</TrafficPlanUI.Properties.Settings>
</applicationSettings>
仔细核对代码,原来在引用web service时, 配置节点configSections, 中的内容也添加了一行:
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="TrafficPlanUI.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="TrafficPlanUI.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>