Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF Protocol Exception

We are getting some weird behavior from a service we have deployed on a remote system which we are using to access and post data to.

Retrieving information from the service doesn't seem to be an issue. However, whenever we try to execute insert methods on the service we get an System.ServiceModel.ProtocolException. The weird thing is, it will successfully execute approximate 40 records before faulting.

The client is communicating over SSL and TransportWithMessageSecurity is enabled on the wsHttpBinding.

The error message is being generated at the "Set up Secure Session activity":

System.ServiceModel.ProtocolException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly.

We have tried a number of tests all of which consistently fault as soon as we reach a particular number of inserts.

Any suggestions would be appreciated.

like image 260
stephenl Avatar asked Mar 15 '26 20:03

stephenl


2 Answers

I wonder if the trace viewer might shed some light here? No idea what the problem is, I'm afraid...

like image 192
Marc Gravell Avatar answered Mar 18 '26 16:03

Marc Gravell


If a piece of code sends you HTML, then you should probably read it to see what it says.

like image 42
John Saunders Avatar answered Mar 18 '26 16:03

John Saunders



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!