I
Ian Jones
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 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