Thread being aborted

M

MichaelR

I'm getting a curious result from a module using WinInet on the client and
IIS 6.0/ASP.NET on the server. Can't really tell if it's a client or a
server issue.

The client module uses HttpSendRequestEx to open a request and
InternetWriteFile to send large text files in chunks. The pseudocode looks
like this:

- open a request ("POST")
- fill in file size in INTERNET_BUFFERS struct
- send HttpSendRequestEx
- begin a loop
- read x bytes from the input file
- write x bytes using InternetWriteFile
- end loop at end of file
- HttpEndRequest
- Check the status code from the server

This module is being used to send relatively large PostScript files (which
are text files). The server side of this connection is an .aspx page which
reads the request as a binary stream and writes out a file.

However, occasionally, the operation returns a status code 500 to the
client. The IIS log files also show a request with a status code 500. The
..aspx code is in a try/exception block and writes exception descriptions out
to the event log. When this error happens the exception description is
"Thread was being aborted".

The curious thing is that this is a very reproduceable situation. I have a
PowerPoint file with 13 slides in it. I can produce the PostScript text
file by printing to a file. Something in one of those slides (the 9th of
13) triggers this error. If I create a PostScript file with slide 1-8 and
10-13, no problem. A PostScript file that includes slide 9 (alone or with
other slides) triggers the error.

I can eliminate file size as an issue (I've successfully sent file 10 times
larger).
I can eliminate network interruptions as an issue. This happens every time
with specific files.

Any thoughts about what could be causing this? Is there any way to identify
if this is a client or a server issue?

Thanks,

Michael R.
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top