0

Possible Duplicate:
Client found response content type of 'text/html', but expected 'text/xml'

I am adding web reference for user authentication. The project build its successful. But after that once I enter an username and password and enter logon button it gives below error message.

"Client found response content type of 'text/html', but expected 'text/xml"

Here is my code:

webservice.API c = new webservice.API();
var ret = c.checkAuth(new Guid("34343-kjk343-44343-3434"), UserName.Text, Password.Text);
if (ret.APIStatus.id == 1)
{
}
else
{
}

Any help would appreciate it.

Community
  • 1
  • 1
user1401212
  • 3
  • 1
  • 2
  • 1
    similar questions http://stackoverflow.com/questions/490677/client-found-response-content-type-of-text-html-but-expected-text-xml – Devjosh May 25 '12 at 18:45

2 Answers2

1

In firefox use firebug and see what error is coming from webservice, as it seems that some error page is being returned from web service.

If you have web project and web service project both in same solution than try to debug the application and you will find out what is happening with the service.

Imran Balouch
  • 2,170
  • 1
  • 18
  • 37
0

The problem seems to be on the webservice side, not on your client app. Do you have control on the webservice? If so you should be able to verify that it correctly sends a response with Content-Type: text/xml

You should also use Fiddler2 to monitor what is going on and check additional properties on the request and response that are being sent and received.