无法识别的元素“extendedProtectionPolicy”

 

在Windows7下建立的一个项目,在XP中打开后,更新WCF服务时爆出了错误:无法识别的元素“extendedProtectionPolicy”。通过网上搜索,错误原因如下:

当在 Windows 7 上用 VS2008 开发 WCF 3.5 客户端程序时,VS 将在自动生成的配置文件的 ***Binding/security/transport 节中插入

<extendedProtectionPolicy policyEnforcement="Never" />

如果将此程序在其他操作系统上启动时将报错:无法识别的元素“extendedProtectionPolicy” (Unrecognized element extendedProtectionPolicy)。

解决方法为:直接删除此节点。

网上找到的其它信息:

这是一个已知的问题,仅存在 Windows 7 系统上,似乎 Windows 7 对 .NET 3.5 的特殊扩展,但其他早期版本操作系统又不支持,下面是来自 WCF Team 的解释:

Thank you for contacting us with your question.
Windows 7 has an additional security feature called Extended Protection. When you create an app.config for a client from the Windows 7 service, the tag "extendedProtectionPolicy" will be present in the app.config. When deploying the client to versions of Windows prior to Windows 7, this tag will not be valid. This is a known issue. This tag is not actually used by the client, so simply remove the tag. We will try to update future versions of .Net 3.5 to not include this tag in the generated app.config.
Thanks,
WCF Team

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值