Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.

Reply
Thread Tools

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.

 
 
Søren M. Olesen
Guest
Posts: n/a
 
      02-02-2005
Hi

I'm trying to setup a webservice on a Windows 2003 server, however each time
I call it I get the error:

Client found response content type of 'text/html; charset=utf-8', but
expected 'text/xml'. The request failed with the error message

My directorystructure is a follows:

Inetpub
wwwroot
DPP
http
UtilityServices

Where 'http' is where my webapplication (Website, ApplicationName 'Default
Application') is located and UtilityServices is where my webservice is
located (Virtual dir, ApplicationName 'UtilityServices')

If a web.config file exists in my UtilityServices, I get the above error, if
not everything works (almost) fine. However I'd like there to be a
web.config file, since I need to setup some appSettings which are different
between the two.

Ant help would be greatly appreciated, TIA


Søren


 
Reply With Quote
 
 
 
 
Dilip Krishnan
Guest
Posts: n/a
 
      02-02-2005
Hello Søren,
Could you open your UtilityServices project in IE and see what the error
is in html

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

> Hi
>
> I'm trying to setup a webservice on a Windows 2003 server, however
> each time I call it I get the error:
>
> Client found response content type of 'text/html; charset=utf-8', but
> expected 'text/xml'. The request failed with the error message
>
> My directorystructure is a follows:
>
> Inetpub
> wwwroot
> DPP
> http
> UtilityServices
> Where 'http' is where my webapplication (Website, ApplicationName
> 'Default Application') is located and UtilityServices is where my
> webservice is located (Virtual dir, ApplicationName 'UtilityServices')
>
> If a web.config file exists in my UtilityServices, I get the above
> error, if not everything works (almost) fine. However I'd like there
> to be a web.config file, since I need to setup some appSettings which
> are different between the two.
>
> Ant help would be greatly appreciated, TIA
>
> Søren
>



 
Reply With Quote
 
 
 
 
Søren M. Olesen
Guest
Posts: n/a
 
      02-02-2005
Hi

That's the strange thing, if I try to call my service using the IE
help-interface I don't seem to have the problem.

Regards,

Søren




"Dilip Krishnan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ...
> Hello Søren,
> Could you open your UtilityServices project in IE and see what the error
> is in html
>
> HTH
> Regards,
> Dilip Krishnan
> MCAD, MCSD.net
> dkrishnan at geniant dot com
> http://www.geniant.com
>
>> Hi
>>
>> I'm trying to setup a webservice on a Windows 2003 server, however
>> each time I call it I get the error:
>>
>> Client found response content type of 'text/html; charset=utf-8', but
>> expected 'text/xml'. The request failed with the error message
>>
>> My directorystructure is a follows:
>>
>> Inetpub
>> wwwroot
>> DPP
>> http
>> UtilityServices
>> Where 'http' is where my webapplication (Website, ApplicationName
>> 'Default Application') is located and UtilityServices is where my
>> webservice is located (Virtual dir, ApplicationName 'UtilityServices')
>>
>> If a web.config file exists in my UtilityServices, I get the above
>> error, if not everything works (almost) fine. However I'd like there
>> to be a web.config file, since I need to setup some appSettings which
>> are different between the two.
>>
>> Ant help would be greatly appreciated, TIA
>>
>> Søren
>>

>
>



 
Reply With Quote
 
Guest
Posts: n/a
 
      02-05-2005
Hello!

| Could you open your UtilityServices project in IE and see what the error
| is in html

| > Client found response content type of 'text/html; charset=utf-8', but
| > expected 'text/xml'. The request failed with the error message

I experienced the same effect with some other errors within my
web-applications.

To me the question is, why ASP.NET sometimes tries to return errors occuring
within a WebMethod as a HTML-page instead of throwing a (SOAP-) exception?
Is there a way to avoid this behaviour?

By the way this behaviour is a tic more annoying if it happens while calling
the WebMethod from a mobile client (with the CF), then you get an error
message like "assembly of ressource not found". I wish you a lot of fun to
find the "real" error if your customer tells you that message...

Thanks,
D.Barisch





 
Reply With Quote
 
Dan Rogers
Guest
Posts: n/a
 
      02-15-2005
This typically means that the config file you are using has an error in it.
WHat you are likely seeing is the error message - this can come from the
asp.net runtime (due to config error) or from IIS (e.g. invalid path, or
applicaiton exception that wasn't caught).

I'd recommend tracing the call (trace.axd) to see what's happening.

--------------------
>Reply-To: "Søren M. Olesen" <(E-Mail Removed)>
>From: "Søren M. Olesen" <(E-Mail Removed)>
>Subject: Client found response content type of 'text/html; charset=utf-8',

but expected 'text/xml'.
>Date: Wed, 2 Feb 2005 07:42:19 +0100
>Lines: 31
>Organization: Digital Xpress
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>X-RFC2646: Format=Flowed; Original
>Message-ID: <#(E-Mail Removed)>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: 195.41.222.129
>Path:

cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGXA01.phx.gbl!cpmsftngxa0
6.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gb l
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:27910
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>Hi
>
>I'm trying to setup a webservice on a Windows 2003 server, however each

time
>I call it I get the error:
>
>Client found response content type of 'text/html; charset=utf-8', but
>expected 'text/xml'. The request failed with the error message
>
>My directorystructure is a follows:
>
>Inetpub
> wwwroot
> DPP
> http
> UtilityServices
>
>Where 'http' is where my webapplication (Website, ApplicationName 'Default
>Application') is located and UtilityServices is where my webservice is
>located (Virtual dir, ApplicationName 'UtilityServices')
>
>If a web.config file exists in my UtilityServices, I get the above error,

if
>not everything works (almost) fine. However I'd like there to be a
>web.config file, since I need to setup some appSettings which are

different
>between the two.
>
>Ant help would be greatly appreciated, TIA
>
>
>Søren
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. Jesús Bosch ASP .Net 1 07-03-2006 02:04 PM
Client found response content type of '', but expected 'text/xml'. Robert Rotstein ASP .Net 0 12-21-2005 01:26 AM
Re: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml' Damon Payne ASP .Net 0 03-08-2005 02:35 AM
Client found response content type of '', but expected 'text/xml'. with Wse 2.0 powerranger ASP .Net Web Services 0 07-26-2004 02:47 AM
Client found response content type of '', but expected 'text/xml' Vish Ramachandran ASP .Net Web Services 1 05-26-2004 08:09 AM



Advertisments