Professional Web Applications Themes

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

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; cht=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 ...

  1. #1

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

    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; cht=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


    Søren M. Olesen Guest

  2. #2

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

    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
    [url]http://www.geniant.com[/url]
    > 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; cht=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
    >

    Dilip Krishnan Guest

  3. #3

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

    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" <dkrishnanNOSPAM.geniant.com> wrote in message
    news:265135632429280642707856msnews.microsoft.com ...
    > 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
    > [url]http://www.geniant.com[/url]
    >
    >> 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; cht=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
    >>
    >
    >

    Søren M. Olesen Guest

  4. #4

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

    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; cht=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





    Guest

  5. #5

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

    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" <smolesenhotmail.com>
    >From: "Søren M. Olesen" <smolesenhotmail.com>
    >Subject: Client found response content type of 'text/html; cht=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: <#rpCiJPCFHA.3616TK2MSFTNGP11.phx.gbl>
    >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; cht=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
    >
    >
    >
    Dan Rogers Guest

Similar Threads

  1. Client found response content type of '', but expected 'text/xml'
    By Vish Ramachandran in forum ASP.NET Web Services
    Replies: 7
    Last Post: November 2nd, 11:36 AM
  2. found content type of 'text/html; but expected 'text/xml'
    By Kumarforg in forum ASP.NET Web Services
    Replies: 2
    Last Post: September 22nd, 01:05 PM
  3. Replies: 0
    Last Post: July 26th, 02:47 AM
  4. Replies: 0
    Last Post: November 14th, 08:47 PM
  5. Replies: 0
    Last Post: September 30th, 06:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139