我正在尝试在我的wcf服务中使用standardEndpoints,如下所示。我收到“serviceHostingEnvironment具有无效的子元素”错误。
有什么想法吗?
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
<standardEndpoints>
<webscriptendpoint>
<standardendpoint crossdomainscriptaccessenabled="true">
</standardendpoint>
</webscriptendpoint>
</standardEndpoints>
</serviceHostingEnvironment>发布于 2012-05-23 06:51:07
<standardEndpoints>是<system.serviceModel>的孩子,而不是<serviceHostingEnvironment>。你需要类似下面这样的配置:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
</serviceHostingEnvironment>
<standardEndpoints>
<webscriptendpoint>
<standardendpoint crossdomainscriptaccessenabled="true">
</standardendpoint>
</webscriptendpoint>
</standardEndpoints>
</system.serviceModel>https://stackoverflow.com/questions/10711118
复制相似问题