Error: content type of 'text/html; but expected 'text/xml'.

R

ramarnath

Hi,

I've created a webservice, which is working fine in development
environment and UAT environment. but i received following error often
in staging environment, not all the time.

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

<html> <head> <title>Runtime Error</title> <style> body
{font-family:"Verdana";font-we­ight:normal;............ and so on.

Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
-----------------

And it says set customErrors mode should be in Off. But already its in
Off mode.

I'm not able to see any aspx page, which uses webservice.
Is it problem with IIS settings?
i'd really apreichate it if anyone could help me out.

Kind Regards,
amar
 
G

Guest

Hi

Whats happening is your web service is returning an error page which has
HTML content rather than the XML expected

If you look through the section after "The request failed with
the error message: -- " it should tell you why it failed

There are also a couple of other things you can do such as, if your web
services use primative types then you can test them directly through the auto
test pages or else you could add one or 2 dummy web methods (like the
helloWorld one) which would allow you to smoke test the web service

Something you should also look at is beefing up your error handling and
returning some kind of sucess/failure code

Cheers

Felix
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top