Error: content type of 'text/html; but expected 'text/xml'.

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default Error: content type of 'text/html; but expected 'text/xml'.

    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: -- <html> <head> <title>Runtime Error</title>
    <style> body {font-family:"Verdana";font-weight:normal;............ and
    so on.

    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.
    -----------------

    And it says set customErrors mode should be in Off. But already its in
    Off mode.

    I'm not able to see any aspx page, which uses webservice.
    Is it problem with IIS settings?
    i'd really apreichate it if anyone could help me out.

    Kind Regards,
    amar

    amar Guest

  2. Similar Questions and Discussions

    1. Client found response content type of 'text/html; charset=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...
    2. found content type of 'text/html; but expected 'text/xml'
      Hi, i get the error "Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml' when i invoke a webservice...
    3. Client found response content type of '', but expected 'text/xml'. with Wse 2.0
      I created a very simple application which calls a ws which in turns call another ws and return true. In my Windows application, I have the...
    4. Client found response content type of '', but expected 'text/xml'
      I am trying to run a web service project with multiple web services. The problem is that this works sometimes, and sometimes it does not work. I've...
    5. error ...response text/html;charset=utf-8 expected 'text/xml'
      I have the same problem - anyone figure out an answer? Thanks! "Georgia Powel" <gpowel@isnsecurity.com> wrote in news:0d1201c37d21...
  3. #2

    Default Re: Error: content type of 'text/html; but expected 'text/xml'.

    I had almost simlar problem and i figured it out that my web.config had some
    error in the xml schema, but in my case offcourse i was not able to call web
    service even once.
    May be there is a similar issue with you with some exception been generated

    ~Peace


    "amar" <ramarnath@gmail.com> wrote in message
    news:1122292906.760931.199600@o13g2000cwo.googlegr oups.com...
    > 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: -- <html> <head> <title>Runtime Error</title>
    > <style> body {font-family:"Verdana";font-weight:normal;............ and
    > so on.
    >
    > 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.
    > -----------------
    >
    > And it says set customErrors mode should be in Off. But already its in
    > Off mode.
    >
    > I'm not able to see any aspx page, which uses webservice.
    > Is it problem with IIS settings?
    > i'd really apreichate it if anyone could help me out.
    >
    > Kind Regards,
    > amar
    >

    roger Guest

  4. #3

    Default Re: Error: content type of 'text/html; but expected 'text/xml'.

    I have the same error. I doesn't make any sense to me. I am using the new VS
    2005 beta2.
    The error occurs when i set the timeout to (-1).
    The function I called in the webservice takes lots of time.
    I call the service like
    WebService ws = new WebService();

    ws.Timeout = -1;

    int result = ws.SimpleTest1();

    "amar" <ramarnath@gmail.com> wrote in message
    news:1122292906.760931.199600@o13g2000cwo.googlegr oups.com...
    > 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: -- <html> <head> <title>Runtime Error</title>
    > <style> body {font-family:"Verdana";font-weight:normal;............ and
    > so on.
    >
    > 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.
    > -----------------
    >
    > And it says set customErrors mode should be in Off. But already its in
    > Off mode.
    >
    > I'm not able to see any aspx page, which uses webservice.
    > Is it problem with IIS settings?
    > i'd really apreichate it if anyone could help me out.
    >
    > Kind Regards,
    > amar
    >

    Heribert Coumans Guest

  5. #4

    Unhappy Re: Error: content type of 'text/html; but expected 'text/xml'.

    i have the same error .
    marwa Guest

Posting Permissions

  • You may not post new threads
  • You may 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