Wcf服务:服务器提交的协议违规 [英] Wcf service : server committed protocol violation
问题描述
大家好,
我在配置了SSL证书的服务器上托管了WCF服务。
我有两个为此服务添加的端点:
Hi All,
I have a WCF service hosted on a server which is configured with the SSL certificate.
I have two endpoints added for this service :
<services>
<service name="" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="wsHttpBinding"
bindingConfiguration="wsHttpBindingConfig" contract="IService">
<identity>
<dns value="https://serverName/service.svc" />
</Identity>
</endpoint>
<host>
<baseAddresses>
<add baseAddress="https://ServerName/service.svc"></add>
</baseAddresses>
</host>
</service>
<service name="Scheduler" behaviorConfiguration="SchedulerBehavior">
<endpoint address="" binding="wsHttpBinding"
bindingConfiguration="wsHttpBindingConfig" contract="IService2">
<identity>
<dns value="https://ServerName/Service.svc" />
</identity>
</endpoint>
<host>
<baseAddresses>
<add baseAddress="https://ServerName/Service1.svc"></add>
</baseAddresses>
</host>
</service>
</services>
当我在visual studio接收中添加服务引用时,想要使用两个不同的端点,
以下错误消息:
Want to use the two different endpoints ,
when I am adding service reference in visual studio receiving following error message:
There was an error downloading 'https://BaseAddress/Service.svc/_vti_bin/ListData.svc/$metadata'.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
Metadata contains a reference that cannot be resolved: 'https://BaseAddress/Service.svc'.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
If the service is defined in the current solution, try building the solution and adding the service reference again.
请帮我解决这个问题。
提前感谢您的回复。
--Avinash
我的尝试:
服务器提交了协议违规
Please help me to resolve this issue.
Thanks in advance for your response.
--Avinash
What I have tried:
The server committed a protocol violation
推荐答案
metadata'。
服务器提交了协议违规。 Section = ResponseHeader Detail = CR必须后跟LF
元数据包含无法解析的引用:' https ://BaseAddress/Service.svc'跨度>。
服务器提交了协议违规。 Section = ResponseHeader Detail = CR必须后跟LF
服务器提交了协议违规。 Section = ResponseHeader Detail = CR必须后跟LF
如果服务 定义 当前解决方案,尝试构建解决方案并再次添加服务引用。
metadata'. The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF Metadata contains a reference that cannot be resolved: 'https://BaseAddress/Service.svc'. The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF If the service is defined in the current solution, try building the solution and adding the service reference again.
请帮我解决这个问题。
提前感谢您的回复。
--Avinash
我的尝试:
服务器提交协议违规
Please help me to resolve this issue.
Thanks in advance for your response.
--Avinash
What I have tried:
The server committed a protocol violation
打开IIS - >单击HTTP响应标题并删除X-Content-Type-Options = nosniff ...它对我有用...礼貌Babu Arumugam
Open IIS -> Click HTTP Response Headers and Remove the X-Content-Type-Options=nosniff ... It worked for me... Courtesy Babu Arumugam
这篇关于Wcf服务:服务器提交的协议违规的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!