简体   繁体   English

从服务器 2008 r2 中的 dotnet 核心调用 SOAP wcf 服务 (.net 4.5.2) 时出现问题

[英]Problem calling a SOAP wcf service (.net 4.5.2) from dotnet core in server 2008 r2

I have made a webapi service in dotnet core (I've tried both 2.2 and 3.1).我在 dotnet core 中做了一个 webapi 服务(我已经尝试了 2.2 和 3.1)。

It is a bridge to an old wcf soap service (.net 4.5.2) and it runs fine when both services are on my win10 dev machine.它是旧 wcf 肥皂服务(.net 4.5.2)的桥梁,当这两个服务都在我的 win10 开发机器上时,它运行良好。

When the wcf service is placed on our server (2008 r2), I get this error:当 wcf 服务放置在我们的服务器 (2008 r2) 上时,我收到此错误:

"message": "The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: 'http://testxxxitms-api.xxxbilling.org/Service.svc? disco \\" "message": "响应消息的内容类型 text/html; charset=UTF-8 与绑定的内容类型 (text/xml; charset=utf-8) 不匹配。如果使用自定义编码器,请确保IsContentTypeSupported 方法实现正确。响应的前 1024 个字节是:'http://testxxxitms-api.xxxbilling.org/Service.svc? disco \\”

The error is that I get an html answer instead of xml and it seems that the reason is that the call is somehow changed to a 'disco' call.错误是我得到的是 html 答案而不是 xml,原因似乎是该调用以某种方式更改为“disco”调用。 The only thing I change in the client, is the endpoint address and it does not contain the disco parameter.我在客户端中唯一改变的是端点地址,它不包含迪斯科参数。

I can call the wcf service with SOAPUI.我可以使用 SOAPUI 调用 wcf 服务。

What can cause this behaviour?什么会导致这种行为?

Thx /Jesper谢谢/杰斯珀

Thanks a lot Abraham.非常感谢亚伯拉罕。

Your input led me to try a myriad of solutions.您的意见让我尝试了无数的解决方案。 My conclusion is that it will not work on Windows Server 2008.我的结论是它不适用于 Windows Server 2008。

I have insisted to have the server upgraded to 2012 and now it works :)我坚持将服务器升级到 2012 年,现在它可以工作了:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM