in my local machine I turned On IIS, created virtual directories, built the code and tried to launch the web page, but I am getting the following error --
"System.InvalidOperationException: Client found response content type of 'text/html; charset=utf-8', but expected 'application/soap+xml'"
Can anyone kindly let me know how to rectify this. Platform used is Windows 7, working with Visual studio 2005, C#.NET. I am new to this, had never worked on these.
Kindly help me. Thanks In advance.
It's seems you are working with SOAP1.1 (that use de content type text/xml ) instead of SOAP1.2 (that use conte type application/soap+xml).
In your web.config add this:
<system.web>
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpSoap12"/>
</protocols>
</webServices>
</system.web>
It makes your web service accept SOAP1.1 and SOAP1.2 request.
If your are working on the client part, you must activate SOAP1.2 protocol for your client application. Can't say anymore without code and explanations.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.