Strange response on first call to web service

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
 
N

Neil

Ian said:
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 ?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top