469,903 Members | 1,517 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

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


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,

Nov 19 '05 #1
1 3136

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


Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by JumpingOffPlace | last post: by
1 post views Thread by finizaini | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.