Board index » Web Programming » POST requests arrive late to ISAPI

POST requests arrive late to ISAPI

Web Programming15
Hi,



I have an ISAPI application running in IIS 5 and 6. For each POST

request, HttpExtensionProc starts a worker thread, and returns

HSE_STATUS_PENDING so it handle other requests.



Sometimes a of the worker threads does a long and busy task that might

take 1-2 minutes (e.g., read a 1GB file and caclulate its CRC).

In this case it first responds to the client and then does the long

task asyncronously.



I found that during this time, if the client machine sends a second

POST to this server using the same connection (open socket), ISAPI does

NOT receive this POST until the long operation is done.



I wonder why ISAPI does not receive the second POST, and if there any

way to fix it. The other POST are important for the client to know the

progress of the server's long operation.



Thanks in advance



Sruli Ganor


-
 

Re:POST requests arrive late to ISAPI

When do you call HSE_REQ_DONE_WITH_SESSION -- on the queue of the long and

busy task or on the completion of the long and busy task.



--

//David

IIS

blogs.msdn.com/David.Wang">blogs.msdn.com/David.Wang

This posting is provided "AS IS" with no warranties, and confers no rights.

//



"Sruli" <ganor@softlink.com>wrote in message

Quote
Hi,



I have an ISAPI application running in IIS 5 and 6. For each POST

request, HttpExtensionProc starts a worker thread, and returns

HSE_STATUS_PENDING so it handle other requests.



Sometimes a of the worker threads does a long and busy task that might

take 1-2 minutes (e.g., read a 1GB file and caclulate its CRC).

In this case it first responds to the client and then does the long

task asyncronously.



I found that during this time, if the client machine sends a second

POST to this server using the same connection (open socket), ISAPI does

NOT receive this POST until the long operation is done.



I wonder why ISAPI does not receive the second POST, and if there any

way to fix it. The other POST are important for the client to know the

progress of the server's long operation.



Thanks in advance



Sruli Ganor







-

Re:POST requests arrive late to ISAPI

You are right. I didn't call DONE_WITH_SESSION before starting the long

operation.

Now it's working fine.



Many thanks



Sruli



-