Fog Creek Software
Discussion Board

Attachment error - File could not be opened

We are getting very strange and sporadic behaviour with file attachments.  Every user seems to be able to attach files with no error being reported.  However, is many cases clicking the file link in the case history generates this error:

File:  /fogbugz/download.asp 
Line:  95 
Error:  File could not be opened. 

We can't consistently reproduce the the bug but its fails in about 75% of attempts.  For some users it always works, for other users it sometimes works, sometimes not.  We have tried different types of file ( .doc, .pdf, . rtf ), long/short file names but can't find any pattern.

Its really frustrating - any ideas?

Andrew Jackson
Wednesday, January 21, 2004

Are you on Windows Server 2003?

We had a similar situation a few months back.  I spent some time working with Michael Pryor (Fog Creek) on the issue.  Some of it was related to settings in IIS 6.  After changing some settings, file attachments were much more reliable.

Michael also helped me add a few lines to the *.asp that would verify the upload immediately.  So, if a user was adding an attachment and the attachment failed, they would immediately see an error message (in which case they could re-attempt the attachment, or use FTP, or email, or ...).  Having this extra error message helps because you know immediately when an upload fails - you don't have to wait until some really needs the file before realizing that it is not there.

Wednesday, January 21, 2004

Did you turn on Windows authentication for the fogbugz virtual directory or any directories above it?  The quick fix here is to give Everyone full permissions on the FileUploads folder.

Michael H. Pryor (fogcreek)
Wednesday, January 21, 2004

We're suffering from the same problem - randomly attachment don't work. Could someone post the modifications required to verify attachments immediately?

Also, we observed one case where the problem was due to a + sign in the file name of the attachment - this somehow is replaced by a space in the sFileName argument to DownloadFile in the download.asp file.

Ulrich Callmeier
Wednesday, May 26, 2004

*  Recent Topics

*  Fog Creek Home