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

Discussion in 'ASP .Net Web Services' started by Søren M. Olesen, Feb 2, 2005.

  1. 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
     
    Søren M. Olesen, Feb 2, 2005
    #1
    1. Advertising

  2. 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
    >
     
    Dilip Krishnan, Feb 2, 2005
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:...
    > 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
    >>

    >
    >
     
    Søren M. Olesen, Feb 2, 2005
    #3
  4. Søren M. Olesen

    Guest Guest

    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
     
    Guest, Feb 5, 2005
    #4
  5. Søren M. Olesen

    Dan Rogers Guest

    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" <>
    >From: "Søren M. Olesen" <>
    >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: <#>
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    >NNTP-Posting-Host: 195.41.222.129
    >Path:

    cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGXA01.phx.gbl!cpmsftngxa0
    6.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
    >Xref: cpmsftngxa10.phx.gbl

    microsoft.public.dotnet.framework.aspnet.webservices:27910
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    >
    >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
    >
    >
    >
     
    Dan Rogers, Feb 15, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    0
    Views:
    580
    Guest
    Feb 20, 2004
  2. Damon Payne
    Replies:
    0
    Views:
    9,204
    Damon Payne
    Mar 8, 2005
  3. Robert Rotstein
    Replies:
    0
    Views:
    2,816
    Robert Rotstein
    Dec 21, 2005
  4. Jesús Bosch
    Replies:
    1
    Views:
    13,100
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jul 3, 2006
  5. tony
    Replies:
    0
    Views:
    240
Loading...

Share This Page