views:

2067

answers:

3

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.

+1  A: 

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

Marc Gravell
Hi Marc, the trace viewer is what gave me the exception in the first place. I can recreate the error and get the same result, but I don't know what is causing it.
Steve
then I'm stumped; if it didn't work at *all*, there are a number of ideas - but stopping after a short while? Odd.
Marc Gravell
Further testing has revealed that there may actually be a configuration issue with the SSL certificate on the host. Might be a few days before I know more but will post solution if I ever find out what the issue was. Cheers.
Steve
A: 

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

John Saunders
A: 

You probably have reached the configured message size and the WCF infrastructure is truncating the SOAP message, making the serializer (Contract or XML Serializer) to not be able to deserialize the message.

Try increasing the WCF request size see < readerQuotas >

Pop Catalin
Yes, but there was this HTML message...
John Saunders