元素"transport"不能包含子元素"extendedProtectionPolicy",因为父元素的内容模型为空 [英] the element 'transport' cannot contain child element 'extendedProtectionPolicy' because the parent element's content model is empty

查看:98
本文介绍了元素"transport"不能包含子元素"extendedProtectionPolicy",因为父元素的内容模型为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继承了一个调用Web服务的Web应用程序.它是在VS2008 SP1中开发的,并已部署到IIS6(2k3服务器R2).

I inherited a web application that makes calls to a web service. It is being developed in VS2008 SP1 and deployed to IIS6 (2k3 Server R2).

自从我升级到Windows 7 Enterprise RTM以来,以下行已添加到我的Web.config:

Since I upgraded to Windows 7 Enterprise RTM, the following line gets added to my Web.config:

<extendedProtectionPolicy policyEnforcement="Never" />

问题是,当我将此应用程序部署到Web服务器时,出现以下错误:

The problem is that when I deploy this application to my web server I get the following error:

元素"transport"不能包含子元素"extendedProtectionPolicy",因为父元素的内容模型为空

The element 'transport' cannot contain child element 'extendedProtectionPolicy' because the parent element's content model is empty

我可以删除该行,它会起作用,但是很痛苦,有时我忘记再次删除它(VS2008添加似乎在我加载解决方案时将其重新添加!).

I can remove the line and it will work, but its a pain and I forget sometimes to remove it again (VS2008 adds seems to add it back whenever I load the solution!!).

有什么可以做的吗?

这是我的运输"部分:

<transport clientCredentialType="None" proxyCredentialType="None" realm="">
        <extendedProtectionPolicy policyEnforcement="Never" />
</transport>

谢谢 尼尔

推荐答案

到目前为止,我发现如果您将该部分注释掉……似乎阻止了Visual Studio重新添加它.

So far, I have found that if you comment out that section... it seems to prevent Visual Studio from adding it back again.

这篇关于元素"transport"不能包含子元素"extendedProtectionPolicy",因为父元素的内容模型为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆