Silverlight+WCF exception: Expecting application/soap+xml, received text/xml

前端 未结 4 912
遥遥无期
遥遥无期 2021-02-13 18:07

I have a Silverlight application in which I would like to call a WCF service. When calling the service I receive the following response from the server:

4条回答
  •  梦毁少年i
    2021-02-13 18:53

    I encountered this error trying to connect a Silverlight application to a WCF service.

    The root cause turned out to be that the WCF Service was bound using wsHttpBinding whereas Silverlight only supports basicHttpBinding.

    So check your element in web.config and make sure binding information for your service is in the element and that the element of your service definition uses basicHttpBinding.

提交回复
热议问题