1

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.

codeLover
  • 3,720
  • 10
  • 65
  • 121
  • What code did you build? Where are you getting the exception? Can you post your code? – Oded Jan 28 '11 at 10:51
  • 2
    check out [this related question](http://stackoverflow.com/questions/115319/how-can-the-error-client-found-response-content-type-of-text-html-be-interpr) – V4Vendetta Jan 28 '11 at 10:52

1 Answers1

1

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.

Neonamu
  • 736
  • 1
  • 7
  • 21