Strange response on first call to web service

Discussion in 'ASP .Net Web Services' started by Ian Jones, Jun 22, 2004.

  1. Ian Jones

    Ian Jones Guest

    Hi,

    I have a basic web service that has one method that simply returns a string.

    I am playing about with sending HTTP POSTs to the web service and displaying
    the HTTP response I get.

    The problem I have is that the first time the web service is requested after
    an application rebuild/web.config change etc, the Content-Length header is
    missing, and is represented in its hexadecimal form on a line on its own.
    The normal output then arrives and then a trailing 0.

    Here is the sample output :

    HTTP/1.1 200 OK
    Server: Microsoft-IIS/5.1
    Date: Tue, 22 Jun 2004 13:10:36 GMT
    X-Powered-By: ASP.NET
    Connection: close
    X-AspNet-Version: 1.1.4322
    Transfer-Encoding: chunked
    Cache-Control: private, max-age=0
    Content-Type: text/xml; charset=utf-8

    6d
    <?xml version="1.0" encoding="utf-8"?>
    <string xmlns="http://tempuri.org/">Executed the web service</string>
    0

    Subsequent requests seem to work fine :

    HTTP/1.1 200 OK
    Server: Microsoft-IIS/5.1
    Date: Tue, 22 Jun 2004 13:31:35 GMT
    X-Powered-By: ASP.NET
    Connection: close
    X-AspNet-Version: 1.1.4322
    Cache-Control: private, max-age=0
    Content-Type: text/xml; charset=utf-8
    Content-Length: 109

    <?xml version="1.0" encoding="utf-8"?>
    <string xmlns="http://tempuri.org/">Executed the web service</string>

    Notice that 6d is hexadecimal for the content length (109).

    I have been playing about with HttpModules but have removed these from the
    web.config file so as to narrow down the problems..

    Any thoughts on this most appreciated.

    Thanks

    Ian
    Ian Jones, Jun 22, 2004
    #1
    1. Advertising

  2. Ian Jones

    Neil Guest

    Ian Jones wrote:
    > Hi,
    >
    > I have a basic web service that has one method that simply returns a

    string.
    >
    > I am playing about with sending HTTP POSTs to the web service and

    displaying
    > the HTTP response I get.
    >
    > The problem I have is that the first time the web service is

    requested after
    > an application rebuild/web.config change etc, the Content-Length

    header is
    > missing, and is represented in its hexadecimal form on a line on its

    own.
    > The normal output then arrives and then a trailing 0.
    >
    > Here is the sample output :
    >
    > HTTP/1.1 200 OK
    > Server: Microsoft-IIS/5.1
    > Date: Tue, 22 Jun 2004 13:10:36 GMT
    > X-Powered-By: ASP.NET
    > Connection: close
    > X-AspNet-Version: 1.1.4322
    > Transfer-Encoding: chunked
    > Cache-Control: private, max-age=0
    > Content-Type: text/xml; charset=utf-8
    >
    > 6d
    > <?xml version="1.0" encoding="utf-8"?>
    > <string xmlns="http://tempuri.org/">Executed the web service</string>
    > 0
    >
    > Subsequent requests seem to work fine :
    >
    > HTTP/1.1 200 OK
    > Server: Microsoft-IIS/5.1
    > Date: Tue, 22 Jun 2004 13:31:35 GMT
    > X-Powered-By: ASP.NET
    > Connection: close
    > X-AspNet-Version: 1.1.4322
    > Cache-Control: private, max-age=0
    > Content-Type: text/xml; charset=utf-8
    > Content-Length: 109
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <string xmlns="http://tempuri.org/">Executed the web service</string>
    >
    > Notice that 6d is hexadecimal for the content length (109).
    >
    > I have been playing about with HttpModules but have removed these

    from the
    > web.config file so as to narrow down the problems..
    >
    > Any thoughts on this most appreciated.
    >
    > Thanks
    >
    > Ian



    I am experiencing the same problem, has anybody found a fix or
    workaround for this ?
    Neil, Jan 18, 2005
    #2
    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. Michael Averstegge
    Replies:
    0
    Views:
    4,202
    Michael Averstegge
    Jan 10, 2006
  2. Not Me
    Replies:
    1
    Views:
    3,171
    Not Me
    Jun 5, 2007
  3. Sal
    Replies:
    1
    Views:
    378
  4. RJ
    Replies:
    4
    Views:
    748
    Brock Allen
    Sep 22, 2005
  5. Redhot
    Replies:
    0
    Views:
    757
    Redhot
    Jul 18, 2009
Loading...

Share This Page