473,727 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Client found response content type of 'text/html; charset=Windows-

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
ok. We have trawlled all over the net looking for a solution and we cannot
find out what is causing this. PLEASE HELP!!
Mar 7 '07 #1
13 31419
"Kestfield" <Ke*******@disc ussions.microso ft.comwrote in message
news:14******** *************** ***********@mic rosoft.com...
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
ok. We have trawlled all over the net looking for a solution and we
cannot
find out what is causing this. PLEASE HELP!!
When you receive HTML from a web service, it is usually an error page. You
need to look at the HTML to see what error it's trying to tell you about!

Alternatively, check the Application event log - it may tell you something.

John
Mar 7 '07 #2
Hi John - thanks for your time and comments. The Full HTML I get back is as
follows. I have no idea how to determine what is the cause of the error.
Any help in determining this would be much appreciated.
....

Client found response content type of 'text/html; charset=Windows-1252', but
expected 'text/xml'. The request failed with the error message: -- <html>
<head<title>Run time Error</title<stylebody
{font-family:"Verdana ";font-weight:normal;f ont-size: .7em;color:blac k;} p
{font-family:"Verdana ";font-weight:normal;c olor:black;marg in-top: -5px} b
{font-family:"Verdana ";font-weight:bold;col or:black;margin-top: -5px} H1 {
font-family:"Verdana ";font-weight:normal;f ont-size:18pt;color :red } H2 {
font-family:"Verdana ";font-weight:normal;f ont-size:14pt;color :maroon } pre
{font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold;
color: black;text-decoration: none;} .version {color: gray;} .error
{margin-bottom: 10px;} .expandable { text-decoration:unde rline;
font-weight:bold; color:navy; cursor:hand; } </style</head<body
bgcolor="white" <span><H1>Serve r Error in '/MosaicQe' Application.<hr
width=100% size=1 color=silver></H1<h2<i>Runtime Error</i</h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "<b>
Description: </b>An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed remotely (for security reasons). It
could, however, be viewed by browsers running on the local server machine.
<br><br<b>Detai ls:</bTo enable the details of this specific error message
to be viewable on remote machines, please create a <customErrorsta g within
a "web.config " configuration file located in the root directory of the
current web application. This <customErrorsta g should then have its "mode"
attribute set to "Off".<br><br<t able width=100% bgcolor="#ffffc c"<tr>
<td<code><pre <!-- Web.Config Configuration File --<configuratio n>
<system.web<cus tomErrors mode="Off"/</system.web>
</configuration></pre></code</td</tr</table<br<b>Note s:</bThe
current error page you are seeing can be replaced by a custom error page by
modifying the "defaultRedirec t" attribute of the application's <customErrors >
configuration tag to point to a custom error page URL.<br><br<tab le
width=100% bgcolor="#ffffc c"<tr<td<code>< pre<!-- Web.Config
Configuration File --<configuration< system.web<cust omErrors
mode="RemoteOnl y" defaultRedirect ="mycustompage. htm"/</system.web>
</configuration></pre></code</td</tr</table<br</body</html--.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.InvalidO perationExcepti on: Client found response
content type of 'text/html; charset=Windows-1252', but expected 'text/xml'.
The request failed with the error message: -- <html<head<titl e>Runtime
Error</title<stylebody
{font-family:"Verdana ";font-weight:normal;f ont-size: .7em;color:blac k;} p
{font-family:"Verdana ";font-weight:normal;c olor:black;marg in-top: -5px} b
{font-family:"Verdana ";font-weight:bold;col or:black;margin-top: -5px} H1 {
font-family:"Verdana ";font-weight:normal;f ont-size:18pt;color :red } H2 {
font-family:"Verdana ";font-weight:normal;f ont-size:14pt;color :maroon } pre
{font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold;
color: black;text-decoration: none;} .version {color: gray;} .error
{margin-bottom: 10px;} .expandable { text-decoration:unde rline;
font-weight:bold; color:navy; cursor:hand; } </style</head<body
bgcolor="white" <span><H1>Serve r Error in '/MosaicQe' Application.<hr
width=100% size=1 color=silver></H1<h2<i>Runtime Error</i</h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "<b>
Description: </b>An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed remotely (for security reasons). It
could, however, be viewed by browsers running on the local server machine.
<br><br<b>Detai ls:</bTo enable the details of this specific error message
to be viewable on remote machines, please create a <customErrorsta g within
a "web.config " configuration file located in the root directory of the
current web application. This <customErrorsta g should then have its "mode"
attribute set to "Off".<br><br<t able width=100% bgcolor="#ffffc c"<tr>
<td<code><pre <!-- Web.Config Configuration File --<configuratio n>
<system.web<cus tomErrors mode="Off"/</system.web>
</configuration></pre></code</td</tr</table<br<b>Note s:</bThe
current error page you are seeing can be replaced by a custom error page by
modifying the "defaultRedirec t" attribute of the application's <customErrors >
configuration tag to point to a custom error page URL.<br><br<tab le
width=100% bgcolor="#ffffc c"<tr<td<code>< pre<!-- Web.Config
Configuration File --<configuration< system.web<cust omErrors
mode="RemoteOnl y" defaultRedirect ="mycustompage. htm"/</system.web>
</configuration></pre></code</td</tr</table<br</body</html--.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:
[InvalidOperatio nException: Client found response content type of
'text/html; charset=Windows-1252', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>Runtim e Error</title>
<style>
body {font-family:"Verdana ";font-weight:normal;f ont-size:
..7em;color:bla ck;}
p {font-family:"Verdana ";font-weight:normal;c olor:black;marg in-top:
-5px}
b {font-family:"Verdana ";font-weight:bold;col or:black;margin-top:
-5px}
H1 {
font-family:"Verdana ";font-weight:normal;f ont-size:18pt;color :red }
H2 {
font-family:"Verdana ";font-weight:normal;f ont-size:14pt;color :maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:unde rline; font-weight:bold;
color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white" >

<span><H1>Serve r Error in '/MosaicQe' Application.<hr width=100%
size=1 color=silver></H1>

<h2<i>Runtime Error</i</h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular,
sans-serif ">

<bDescription : </b>An application error occurred on the
server. The current custom error settings for this application prevent the
details of the application error from being viewed remotely (for security
reasons). It could, however, be viewed by browsers running on the local
server machine.
<br><br>

<b>Details:</bTo enable the details of this specific error
message to be viewable on remote machines, please create a <customErrorsta g
within a "web.config " configuration file located in the root directory of the
current web application. This <customErrorsta g should then have its "mode"
attribute set to "Off".<br>< br>

<table width=100% bgcolor="#ffffc c">
<tr>
<td>
<code><pre>

<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration></pre></code>

</td>
</tr>
</table>

<br>

<b>Notes:</bThe current error page you are seeing can be
replaced by a custom error page by modifying the "defaultRedirec t" attribute
of the application's <customErrorsco nfiguration tag to point to a custom
error page URL.<br><br>

<table width=100% bgcolor="#ffffc c">
<tr>
<td>
<code><pre>

<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="RemoteOnl y" defaultRedirect ="mycustompage. htm"/>
</system.web>
</configuration></pre></code>

</td>
</tr>
</table>

<br>

</body>
</html>

--.]

System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.ReadRes ponse(SoapClien tMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall) +1495
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String
methodName, Object[] parameters) +218

MosaicPages.Mos aicQuoteManager .MosaicQuoteMan ager.ValidateCu stomer(MosaicCu stomer
typCustomer) in C:\Inetpub\wwwr oot\Mosaic\Web
References\Mosa icQuoteManager\ Reference.vb:17 3
MosaicPages.QEC ustomer.Submit1 _ServerClick(Ob ject sender, EventArgs e) in
C:\Inetpub\wwwr oot\Mosaic\QECu stomer.aspx.vb: 136
System.Web.UI.H tmlControls.Htm lInputButton.On ServerClick(Eve ntArgs e) +108

System.Web.UI.H tmlControls.Htm lInputButton.Sy stem.Web.UI.IPo stBackEventHand ler.RaisePostBa ckEvent(String eventArgument) +57
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain() +1292


"John Saunders" wrote:
"Kestfield" <Ke*******@disc ussions.microso ft.comwrote in message
news:14******** *************** ***********@mic rosoft.com...
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
ok. We have trawlled all over the net looking for a solution and we
cannot
find out what is causing this. PLEASE HELP!!

When you receive HTML from a web service, it is usually an error page. You
need to look at the HTML to see what error it's trying to tell you about!

Alternatively, check the Application event log - it may tell you something.

John
Mar 7 '07 #3
"Kestfield" <Ke*******@disc ussions.microso ft.comwrote in message
news:01******** *************** ***********@mic rosoft.com...
Hi John - thanks for your time and comments. The Full HTML I get back is
as
follows. I have no idea how to determine what is the cause of the error.
Any help in determining this would be much appreciated.
This is just telling you that an error occurred, but it can't tell you the
details because you said not to show the details.

Look in the event log to see if maybe the details are there. If not, then
you need to get back to basics, like writing your own "I got here" messages
to the event log to see if your web service is even being executed.

John
Mar 7 '07 #4
Hi John

There is nothing in the event logs.

I do need to go back to basics you're right. I stopped the web service
running and I still get exactly the same error so it's not even getting any
where near it to start with! I still think that it is strange that I can
browse the .asmx and see the list of available functions. I just (for some
unknown reason) can't call the web service from a asp.net app?? Any ideas on
possibly tracing the soap request?

"John Saunders" wrote:
"Kestfield" <Ke*******@disc ussions.microso ft.comwrote in message
news:01******** *************** ***********@mic rosoft.com...
Hi John - thanks for your time and comments. The Full HTML I get back is
as
follows. I have no idea how to determine what is the cause of the error.
Any help in determining this would be much appreciated.

This is just telling you that an error occurred, but it can't tell you the
details because you said not to show the details.

Look in the event log to see if maybe the details are there. If not, then
you need to get back to basics, like writing your own "I got here" messages
to the event log to see if your web service is even being executed.

John
Mar 7 '07 #5
"Kestfield" <Ke*******@disc ussions.microso ft.comwrote in message
news:7E******** *************** ***********@mic rosoft.com...
Hi John

There is nothing in the event logs.

I do need to go back to basics you're right. I stopped the web service
running and I still get exactly the same error so it's not even getting
any
where near it to start with! I still think that it is strange that I can
browse the .asmx and see the list of available functions. I just (for
some
unknown reason) can't call the web service from a asp.net app?? Any ideas
on
possibly tracing the soap request?
Simple is probably best, so take a look at http://www.pocketsoap.com/. In
addition to their namesake, they have some tracing tools.

John
Mar 7 '07 #6
Hi,
This error message one gets when there is time out.You can try increase
time-out value in following three places.
[1]Increase the Timeout property of the Web service proxy.
MyWebServ obj = new MyWebServ();
obj.Timeout = 15000; // in milliseconds
[2] Increase timeout value in http-runtime tag in web-config of ASP.NET
project.
[3] Increase timeout value in http-runtime tag in web-config of Web Services
project.

If my answer has helped you,then please do press Yes below.

Thanks and Regards.
Manish Bafna.
MCP and MCTS.

"Kestfield" wrote:
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
ok. We have trawlled all over the net looking for a solution and we cannot
find out what is causing this. PLEASE HELP!!
Mar 8 '07 #7
Hi,

To know exact error set mode="Off" in custom error tag in web-config of
ASP.NET project.
You will find following Link also useful :
http://www.topxml.com/ASPNET-Webserv...text/html.aspx

Also let me know that if suggesstion provided in above url has solved your
probelm

If my answer helped you,then please do press Yes below.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

"Kestfield" wrote:
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
ok. We have trawlled all over the net looking for a solution and we cannot
find out what is causing this. PLEASE HELP!!
Mar 8 '07 #8
Hi Manish

Thanks for your input.

I have tried to turn OFF custom errors and my web.config contains this XML..

<customErrors mode="Off"/>

And it still only shows me the horrible HTML page!

As regards to timeout - the error returns immediately, but I tried what you
recommended all the same and unfortunately to no avail. Any other
recommendations would be much appreciated!!!

"Manish Bafna" wrote:
Hi,

To know exact error set mode="Off" in custom error tag in web-config of
ASP.NET project.
You will find following Link also useful :
http://www.topxml.com/ASPNET-Webserv...text/html.aspx

Also let me know that if suggesstion provided in above url has solved your
probelm

If my answer helped you,then please do press Yes below.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

"Kestfield" wrote:
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
ok. We have trawlled all over the net looking for a solution and we cannot
find out what is causing this. PLEASE HELP!!
Mar 8 '07 #9
Hi,
As given in the link have you set value of Debug to false.Also if your web
service is calling stored procedure then have you tried increasing command
timeout value.
--
If my answer helped you,then please do press Yes below.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

"Kestfield" wrote:
Hi Manish

Thanks for your input.

I have tried to turn OFF custom errors and my web.config contains this XML..

<customErrors mode="Off"/>

And it still only shows me the horrible HTML page!

As regards to timeout - the error returns immediately, but I tried what you
recommended all the same and unfortunately to no avail. Any other
recommendations would be much appreciated!!!

"Manish Bafna" wrote:
Hi,

To know exact error set mode="Off" in custom error tag in web-config of
ASP.NET project.
You will find following Link also useful :
http://www.topxml.com/ASPNET-Webserv...text/html.aspx

Also let me know that if suggesstion provided in above url has solved your
probelm

If my answer helped you,then please do press Yes below.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

"Kestfield" wrote:
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
ok. We have trawlled all over the net looking for a solution and we cannot
find out what is causing this. PLEASE HELP!!
Mar 8 '07 #10

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

Similar topics

1
2064
by: Soheil | last post by:
I use webservice to connect to a server on Internet and sometimes(not always), I recieve this error on calling webserice member functions. Error: ********************************** Client found response content type of '', but expected 'text/xml'. The request failed with the error message: -- <HTML><HEAD><META HTTP-EQUIV="REFRESH" CONTENT="0" URL="http://iransaham.com/dataservice.asmx"></HEAD><BODY>
0
4081
by: daryl | last post by:
I have a situation where a webservice has worked fine in a development environment, but when placed into production has stopped working (although at one time it was). Using WSE 2.0/DIME, we wrote a simple File Transfer and retrieval service, which has to pass through a firewall (the only real difference between dev and production -- at the time). Originally, the error was this:
1
4012
by: Jesús Bosch | last post by:
I get this error after trying to call a method in a webeservice. This webservice returns an html page (as string), but I recieve this error. Someone knows a solution for this? Thanks! Jesús Bosch Aiguadé www.jbmixed.blogspot.com
0
4673
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.
1
2780
by: Mark P | last post by:
I've written a .Net 1.1 Web Service that receives a file and forwards the file to another Web Service (this one written in Java). The Web Service generally works, but intermittently gets the following error when executing the Java Web Service: Client found response content type of 'text/html;charset=utf-8', but expected 'text/xml' The code that executes the Java Web Service: private bool WSFile(sbyte sbfr, string url, string from,...
0
3358
by: Mark P | last post by:
I've written a .Net 1.1 Web Service that receives a file and forwards the file to another Web Service (this one written in Java). The Web Service generally works, but intermittently gets the following error when executing the Java Web Service: Client found response content type of 'text/html;charset=utf-8', but expected 'text/xml' The code that executes the Java Web Service: private bool WSFile(sbyte sbfr, string url, string from,...
0
3711
by: Abbas | last post by:
Hi, I have a web service that is failing when calling from a COM proxy (front-end is in ASP), going to the URL using the browser works, I also have an ASP.NET test page with it that also works. However, when calling the web service using the COM proxy yields the following error that I log into the Application log: Client found response content type of '', but expected 'text/xml'.
4
3398
by: sbettadpur | last post by:
Hi All, I am getting the following Error while connecting to the SQL reports using report viewer .I have given the path like: http://localhost/mytestreportserver/LMSReports/LMSProduction The Error is: Client found response content type of '', but expected 'text/xml'.
2
6670
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
9406
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9260
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
9185
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
9120
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
6703
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
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4786
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2639
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2158
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.