Fog Creek Software
Discussion Board

Attachments sometimes not saved, with no error msg

Version: 3.19

We have observed on a fairly regular basis (at least once/week) that our fogbugz installation (running on Windows Server 2003) gets in a state where attachments are not saved to the FileUploads directory for some reason.

There is no error message when this occurs - the only way we found this out was clicking on the attachment, which was then not found.

We've found that when the system gets in this state, it stays in this state (won't save any attachments) until workaround 1) below is applied.

Our workaround at present is the following:

1) IISReset on the host webserver gets fogbugz / iis back in a state where newly-submitted attachments are saved properly.

2) Modification to CBug.asp to at least throw an exception when this occurs, so user knows their attachment was not saved. This is shown below:

Modification to CBug.asp,  replacing line #825:

If fso.FileExists( sPathToUploadedFile) Then
  fso.MoveFile sPathToUploadedFile, sFolder
  dim file: set file = fso.CreateTextFile(fso.BuildPath(sFolder, "ERRORMSG.TXT"), true)
  dim msg: msg = "Uploaded file '" & sPathToUploadedFile & "' not found to move to folder '" & sFolder & "'--please run IISReset to resolve this condition--please edit and re-attach file to bug #" & ixBug & " (which *was* otherwise saved)"
  file.Write msg

  err.Raise 1, "AddBugEvent", msg
End If

Buc Rogers
Saturday, August 14, 2004

Check out this kb article:

Michael H. Pryor
Fog Creek Software
Saturday, August 14, 2004

Clicking on the link provided gives

Error 404: File Not Found

The file you were looking for was not found on our server.

Perhaps you were looking for:

Information about FogBUGZ (info, technical support)
Information about CityDesk (info, technical support)
The JoelOnSoftware weblog
Fog Creek Contact Information

Monday, August 16, 2004

I pasted it twice ... sorry

Michael H. Pryor
Fog Creek Software
Monday, August 16, 2004

I still get a 404 -> it redirects to if that helps.

Tuesday, August 17, 2004

Searching google for "UploadGhosts", I got this link

Tuesday, August 17, 2004

This doesn't explain why the upload works for a few times before getting into a state where it won't work until IIS is restarted. IIRC, this wasn't an issue until sometime in the past year.

Jeff Key
Wednesday, August 25, 2004

Jeff, are you using 2003?

Fog Creek Software
Wednesday, August 25, 2004

I'm also seeing the same thing, after reports from my users of intermittent image failures; also on Win2K3.

I'm not using Integrated Authentication, and have checked that the FogBUGZ user (ie the IIS account it all runs as) has full control over the FileUploads folder - indeed, it creates the subfolder for the attachment OK, but just never moves the attachement there.

I can't check the AppPool thing, since the links above are 404's...

Phil Dye
Wednesday, November 10, 2004

*  Recent Topics

*  Fog Creek Home