Last post Oct 30, 2014 03:59 AM by Shawn - MSFT
Oct 29, 2014 07:09 AM|Shikku096|LINK
I have web service which is developed in visual studio 2005 which will retrieve and save the data to sql server 2008.which is published to the server located in Qatar and can be accessed globally
Check User Login details ()
Get Customers data() -- less than or equal to 10000 rows
Save customer data()
I have Smart Device Mobile application which is developed in visual studio 2005 of smart device project type, which is installed in windows mobile PDA devices. The mobile application uses the sql compact database to transact the data. And the Published web
service added to smart device application as web reference. The data downloaded to compact database from server through web service and the completed transaction will be uploaded back to server using web service.
Note: The .
I have function like
Check connection: it will check the connection to web service is online or offline.
Sync: upload the data to sever.
Download: get the data from server.
The mobile application’s download/upload is working fine within the country (Qatar) without any issue.
We have the client in other country Saudi Arabia who wants to use this Mobile application.
So we have installed the mobile application in PDA in Saudi Arabia and it is configured to use the web service published in Qatar.
The mobile application is throwing error when it’s trying to check the connection
The detail exception is client found response content type of 'text/html charset=utf-8' but expected 'text/xml'
Note: The published Web Service URL is opening in the internet browser in Saudi Arabia without any issue.
Anyone can help me out to figure out why this error message occurs?
thanks in advance :)
Oct 29, 2014 11:35 AM|mgebhard|LINK
The response is an HTML error response. Read the response it will tell you - most likely - what the error was.
Oct 30, 2014 01:08 AM|Shikku096|LINK
the error which i got from catch( Exception ex)
ex.message ="client found response content type of 'text/html charset=utf-8' but expected 'text/xml'"
So how to read a response from HTML error,can give me some code samples.
thanks in advance
Oct 30, 2014 03:59 AM|Shawn - MSFT|LINK
For this situation, this is happening because there is an unhandled exception in your Web service, and the .NET runtime is spitting out its HTML yellow screen of death server error/exception dump page, instead of XML. Since the consumer of your Web service
was expecting a text/xml header and instead got text/html, it throws that error.
Besides, for more information, you could refer to: