473,379 Members | 1,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

'text/html', but expected 'text/xml'

I have written a PocketPC application that connects to a web service, and
when im connected via the cable or via wireless then it pulls back the data
correctly.

However when connected to GPRS, i get the following error

"Server found request content type to be 'text/html', but expected 'text/xml'"

Does anyone know why this is happening?

Someone previously suggested that its because it is returning too much data,
but i have tested it just returning one 4 character string, and it still
didnt work.

Any suggestions would be much appreciated!!
--
Mark
May 12 '06 #1
4 7038
Usually this sort of error comes when there some exception occured. I would
suggest you to debug ur web service using some simulator. Lets see below error

An unhandled exception of type 'System.InvalidOperationException' occurred
in system.web.services.dll Additional information: Client found response
content type of 'text/html', but expected 'text/xml'

I would suggest you to open tracing on web application and see results. This
will give you an insight that what exactly is going on. Further more, ASP.Net
sometimes tries to return errors occuring in web methods as HTML page rather
than soap exception.

Thsi error occured in webservice but on ur pocket pc it will appear as
expected 'text/xml' error.

"Mark" wrote:
I have written a PocketPC application that connects to a web service, and
when im connected via the cable or via wireless then it pulls back the data
correctly.

However when connected to GPRS, i get the following error

"Server found request content type to be 'text/html', but expected 'text/xml'"

Does anyone know why this is happening?

Someone previously suggested that its because it is returning too much data,
but i have tested it just returning one 4 character string, and it still
didnt work.

Any suggestions would be much appreciated!!
--
Mark

May 14 '06 #2
ok that makes sense, however the error only happens when doing it over GPRS,
so how can i simulate that?

--
Mark
"Altaf Al-Amin Najwani" wrote:
Usually this sort of error comes when there some exception occured. I would
suggest you to debug ur web service using some simulator. Lets see below error

An unhandled exception of type 'System.InvalidOperationException' occurred
in system.web.services.dll Additional information: Client found response
content type of 'text/html', but expected 'text/xml'

I would suggest you to open tracing on web application and see results. This
will give you an insight that what exactly is going on. Further more, ASP.Net
sometimes tries to return errors occuring in web methods as HTML page rather
than soap exception.

Thsi error occured in webservice but on ur pocket pc it will appear as
expected 'text/xml' error.

"Mark" wrote:
I have written a PocketPC application that connects to a web service, and
when im connected via the cable or via wireless then it pulls back the data
correctly.

However when connected to GPRS, i get the following error

"Server found request content type to be 'text/html', but expected 'text/xml'"

Does anyone know why this is happening?

Someone previously suggested that its because it is returning too much data,
but i have tested it just returning one 4 character string, and it still
didnt work.

Any suggestions would be much appreciated!!
--
Mark

May 14 '06 #3
Mark wrote:
"Server found request content type to be 'text/html', but expected
'text/xml'"

Does anyone know why this is happening?

Someone previously suggested that its because it is returning too
much data, but i have tested it just returning one 4 character
string, and it still didnt work.

Any suggestions would be much appreciated!!


Do you want to check the request to see what's sent? You can use the
TraceExtension as given here:
http://msdn.microsoft.com/library/de.../en-us/cpref/h
tml/frlrfsystemwebservicesprotocolssoapextensionclasst opic.asp

--
Deepak Shenoy
http://shenoyatwork.blogspot.com
May 15 '06 #4
I have had a little play around, and ive found that with Windows
Authentication switched on, it doesnt work via GPRS, if i turn Win
Authentication off, then it works fine.

So does Windows Authentication wrap it in larger packets or something that
could be causing the problems?

--
Mark

"Deepak Shenoy" wrote:
Mark wrote:
"Server found request content type to be 'text/html', but expected
'text/xml'"

Does anyone know why this is happening?

Someone previously suggested that its because it is returning too
much data, but i have tested it just returning one 4 character
string, and it still didnt work.

Any suggestions would be much appreciated!!


Do you want to check the request to see what's sent? You can use the
TraceExtension as given here:
http://msdn.microsoft.com/library/de.../en-us/cpref/h
tml/frlrfsystemwebservicesprotocolssoapextensionclasst opic.asp

--
Deepak Shenoy
http://shenoyatwork.blogspot.com

May 16 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: | last post by:
Hello NG! I try to call a WebService from a mobile device. The WebService should return a DataSet, so the call looks like mDataSet = mWebSrv.GetDataSet(<Params>) but instead of returning a...
1
by: ramarnath | last post by:
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. ...
0
by: Saya | last post by:
Hello, The situation is as follows: My server app (ASP.NET WebService) responds to the client request (ASP.NET) by returning a text string appended with 2 int numbers, being the X&Y coordinate...
0
by: S. Berwanger | last post by:
Hallo, I have a PDA (WinCE 4.2) application which using a XML-Webservice for data exchanging. Both parts are developed with VS2003. When I'm using IIS5.1 the system runs without problems. But...
2
by: Jon | last post by:
Anyone seen a webservice return this error: Error: Client found response content type of 'text/html;charset=utf-8', but expected 'text/xml'. The request failed with the error message: --Error...
0
by: msm2601 | last post by:
Hello, I have written a Pocket PC mobile application which calls a web service method. But when code invoke web service method it raise error as Client found response content type of...
13
by: =?Utf-8?B?S2VzdGZpZWxk?= | last post by:
Hi Our company has a .Net web service that, when called via asp.net web pages across our network works 100%! The problem is that when we try and call the web service from a remote machine, one...
14
by: Stanimir Stamenkov | last post by:
I've found some contradiction I want to resolve. <http://www.w3.org/MarkUp/2004/xhtml-faq#mime11states: I've noted "_disallowed_ text/html" and "_must_ be sent with an XML-related media...
2
by: doubts85 | last post by:
i have problem when i try build this application and the error is below. Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.