开发者

WCF Service calling another WCF service fails with web error 400 Bad Request

开发者 https://www.devze.com 2023-01-08 06:31 出处:网络
We have a web service that is called when user clicks save button on web form. The \'save\' web service then makes a call into another web service (different machine).The call always fails and as far

We have a web service that is called when user clicks save button on web form. The 'save' web service then makes a call into another web service (different machine). The call always fails and as far as I can tell does not even attempt to cross the network because the Fiddler traffic is empty. This problem only occurs when we call the second web service from the first web service. If we call the second web service straight from the client or on page load, it works. We are using WebHTTPBinding with REST type services.

I used the WCF trace to come up with the error 'Envelope Version 'EnvelopeNone (http://schemas.microsoft.com/ws/2005/05/envelope/none)' does not support adding Messa开发者_开发技巧ge Headers.', but I don't know how to resolve it.

Any suggestions?


Possible fixes:

  1. Check @ServiceHost directive( in . svc file) is set to "WebServiceHostFactory" source
  2. WebHttpBeahvior element is added in the endpoint behavior source
  3. Put ORDER information in the XML schema Class source
  4. Check that your Data Transfer objects are serrializable source
  5. Check if Skype installed and make sure it doesn't overtake the port source
  6. Remove SOAP message header (it is not supported for REST WCF) source
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号