0

I'm a web service consumer and I'm getting an error like below. My message encoding type is Mtom. What could cause this?

My code

 EndpointAddress epa = new EndpointAddress(this.EndPointAddress);

 BasicHttpBinding sslbinding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
 sslbinding.MessageEncoding = WSMessageEncoding.Mtom;
 sslbinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;

 wsGibCaller.EFaturaPortTypeClient EFAT = new wsGibCaller.EFaturaPortTypeClient(sslbinding, epa);

Error: The content type text/html; charset="utf-8" of the response message does not match the content type of the binding (multipart/related; type="application/xop+xml"). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were:

' html,body{height:100%;padding:0;margin:0;}.oc{display:table;width:100%;height:100%;}.ic{display:table-cell;vertical-align:middle;height:100%;}div.msg{display:block;border:1px solid #30c;padding:0;width:500px;font-family:helvetica,sans-serif;margin:10px auto;}h1{font-weight:bold;color:#fff;font-size:14px;margin:0;padding:2px;text-align:center;background: #30c;}p{font-size:12px;margin:15px auto;width:75%;font-family:helvetica,sans-serif;text-align:left;}Attention!!

Attention!!

The transfer attempted appeared to contain a data leak!

pelitahmet
  • 41
  • 5
  • The real error is hidden from you. You are not getting a response from the webservice - you are getting an error page from the IIS (or whatever webserver you use). To see the real error try browsing the .svc file – Jakob Olsen Nov 10 '15 at 08:23
  • I'm just a client, I'm trying to consume this [link](https://merkez.efatura.gov.tr/EFaturaMerkez/services/EFatura). Until three days ago there were no error like this – pelitahmet Nov 10 '15 at 08:35
  • You could use fiddler to see what the exact response is. You need to be able to see the actual error page returned to you. If you did not change anything on your end the service could be down. – Jakob Olsen Nov 10 '15 at 09:36

0 Answers0