473,549 Members | 2,726 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'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 7051
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.Invalid OperationExcept ion' occurred
in system.web.serv ices.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.Invalid OperationExcept ion' occurred
in system.web.serv ices.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/frlrfsystemwebs ervicesprotocol ssoapextensionc lasstopic.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/frlrfsystemwebs ervicesprotocol ssoapextensionc lasstopic.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
2446
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 DataSet, that call throws an error: InvalidOperationException
1
3263
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. ------------------ Client found response content type of 'text/html; charset=Windows-1252', but expected 'text/xml'. The request failed with the error...
0
1931
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 values of a MouseDown event on the client form. These numbers are supplied by the client. Code snippet: -------------- Client-app:...
0
2815
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 if I use an Win2003 Server with IIS6 for my webservice I am receiving the error: Server found request content type to be 'text/html', but expected...
2
2870
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 500:-- I'm hitting a web service which retuns XML data in a string. It works fine for smaller requests (300K for example)
0
4662
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 'text/html', but expected 'text/xml'. I am running this application using emulator. Same mobile application code is running successfully without any...
13
31374
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 outside of our domain, we get the error.. ** Client found response content type of 'text/html; charset=Windows-1252', but expected 'text/xml' **. We...
14
1822
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 type" here as strong requirement. On the other hand the current XHTML 1.1 draft <http://www.w3.org/TR/2007/WD-xhtml11-20070216/conformance.html#strict>
2
6646
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 error message: -- <html> <head> <title>Configuration Error</title> <style> body...
0
7524
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7720
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7960
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7475
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6048
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5372
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1061
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.