473,604 Members | 2,562 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 7054
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
2449
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
3268
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 message: --
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: myLabel.Text=srvControl.MouseCoordinates(mouseEv.X,
0
2817
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 'text/xml'
2
2872
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
4665
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 error from another PC and also calling same web service method.
13
31380
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 can discover the web service by typing in the url of the asmx so we know the server can 'see' it...
14
1832
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
6649
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 {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
0
7997
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7929
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8406
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8065
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8274
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5882
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3954
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.