By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,833 Members | 2,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,833 IT Pros & Developers. It's quick & easy.

Thread being aborted

P: n/a
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.
Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.