Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.

  • Thread starter Søren M. Olesen
  • Start date
S

Søren M. Olesen

Hi

I'm trying to setup a webservice on a Windows 2003 server, however each time
I call it I get the error:

Client found response content type of 'text/html; charset=utf-8', but
expected 'text/xml'. The request failed with the error message

My directorystructure is a follows:

Inetpub
wwwroot
DPP
http
UtilityServices

Where 'http' is where my webapplication (Website, ApplicationName 'Default
Application') is located and UtilityServices is where my webservice is
located (Virtual dir, ApplicationName 'UtilityServices')

If a web.config file exists in my UtilityServices, I get the above error, if
not everything works (almost) fine. However I'd like there to be a
web.config file, since I need to setup some appSettings which are different
between the two.

Ant help would be greatly appreciated, TIA


Søren
 
D

Dilip Krishnan

Hello Søren,
Could you open your UtilityServices project in IE and see what the error
is in html

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
 
S

Søren M. Olesen

Hi

That's the strange thing, if I try to call my service using the IE
help-interface I don't seem to have the problem.

Regards,

Søren
 
G

Guest

Hello!

| Could you open your UtilityServices project in IE and see what the error
| is in html

| > Client found response content type of 'text/html; charset=utf-8', but
| > expected 'text/xml'. The request failed with the error message

I experienced the same effect with some other errors within my
web-applications.

To me the question is, why ASP.NET sometimes tries to return errors occuring
within a WebMethod as a HTML-page instead of throwing a (SOAP-) exception?
Is there a way to avoid this behaviour?

By the way this behaviour is a tic more annoying if it happens while calling
the WebMethod from a mobile client (with the CF), then you get an error
message like "assembly of ressource not found". I wish you a lot of fun to
find the "real" error if your customer tells you that message...

Thanks,
D.Barisch
 
D

Dan Rogers

This typically means that the config file you are using has an error in it.
WHat you are likely seeing is the error message - this can come from the
asp.net runtime (due to config error) or from IIS (e.g. invalid path, or
applicaiton exception that wasn't caught).

I'd recommend tracing the call (trace.axd) to see what's happening.

--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top