473,327 Members | 2,118 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

ReadEntityBody problem

I'm trying to read files from the request using the ReadEntityBody method on the HttpWorkerRequest

Most of the time it works fine to get chunks from the request but sometimes it takes a long time before this function returns and it doesn't read any bytes. The return value is 0 bytes read

I also check IsClientConnected() on the request to avoid reading a closed request

What could be the possible cause or beter a solution for this problem

Kind Regards
Bjorn
Nov 18 '05 #1
1 1759
Welcome to the internet. This is perfectly normal behavior. ReadEntityBody
gives you access to pipe of input data IIS is sending to the asp.net worker
process. As IIS recieves data on its tcp/ip connection, it send a copy to
the asp.net worker process thru a named pipe. How fast the data comes it
based on the client. Also as the client generally does not have a direct
link to the server (usually many proxies and routers), a connection loss
will not be noticed on IIS. It can not detect the connection is lost until
it sends a response. So generally you timeout the connection to handle this
case.
-- bruce (sqlwork.com)


"Bjorn B" <ms***********@b-virtual.com> wrote in message
news:46**********************************@microsof t.com...
I'm trying to read files from the request using the ReadEntityBody method on the HttpWorkerRequest.
Most of the time it works fine to get chunks from the request but sometimes it takes a long time before this function returns and it doesn't
read any bytes. The return value is 0 bytes read.
I also check IsClientConnected() on the request to avoid reading a closed request.
What could be the possible cause or beter a solution for this problem?

Kind Regards,
Bjorn

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

117
by: Peter Olcott | last post by:
www.halting-problem.com
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
1
by: Bjorn | last post by:
Hi, I'm experiencing the following problem, I have a request which i read in chunks. I'm doing this on my local machine and sometimes it works fine and other times it fails and return 0 bytes as...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
2
by: bstroman | last post by:
I have an HttpModule to intercept the BeginReguest event and then read the Request Stream as it is being sent. The GetPreloadedEntityBody reads the preloaded information from the request and after...
6
by: Jason Chu | last post by:
situation: I'm uploading file to my application using a java applet sending the request (the file) through socket to my asp.net page. On my asp.net page, I've override the httpmodule to take in...
1
by: Jason Chu | last post by:
I have a problem with ReadEntityBody returning 0 even if there's more things to be read (bytes counter for the number of bytes read is less than that of the contentlength). Suggestions?
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
0
by: Andrea | last post by:
I'm trying to do a simple file uploader (well I know that there is a lot around, but it's just to learn) but I don't know how to get the chunk of file. I've started to use the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.