0

I am trying to get datetime of IP camera using DeviceClient object. The same code is working in Windows form application but not in asp.net, mvc app or console app.

The content type (text/xml; charset=utf-8) 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. The first 1024 bytes of the response were:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wstop="ht'.'
Dmitry Grigoryev
  • 3,156
  • 1
  • 25
  • 53
Yogesh Jangir
  • 31
  • 1
  • 4
  • Perhaps you can find the answer here, check your configs https://stackoverflow.com/questions/8637652/wcf-charset-utf-8-of-the-response-message-does-not-match-the-content-type-of-the – Niels de Schrijver May 03 '18 at 09:41
  • I think you need to look for something related to AddressingVersion... Maybe give a look to the response i gave to my question earlier... https://stackoverflow.com/questions/50220574/how-to-generate-getsystemdateandtime-xml – LoukMouk May 09 '18 at 16:59

0 Answers0