小编kar*_*nam的帖子

wcf + 响应消息的内容类型 text/html 与绑定的内容类型不匹配(application/soap+xml; charset=utf-8)

我面临以下错误“响应消息的内容类型 text/html 与绑定的内容类型不匹配 (application/soap+xml; charset=utf-8)。如果使用自定义编码器,请确保IsContentTypeSupported 方法已正确实现。响应的前 514 个字节为"。下面是我的绑定和配置文件

  <customBinding>
                <binding name="LoginServiceSoap12Binding">
                    <textMessageEncoding messageVersion="Soap12" />
                    <httpsTransport />
                </binding>
            </customBinding>

<endpoint address="WCF URL"
             binding="customBinding" bindingConfiguration="LoginServiceSoap12Binding"
             contract="CWALoginService.LoginServicePortType" name="LoginServiceHttpsSoap12Endpoint" />
Run Code Online (Sandbox Code Playgroud)

不确定我在这里面对的是什么问题...

c# wcf binding utf-8 character-encoding

1
推荐指数
1
解决办法
5441
查看次数

标签 统计

binding ×1

c# ×1

character-encoding ×1

utf-8 ×1

wcf ×1