Announcement: SnugUp updated

image

I created a medium sized .NET WPF based application a while back which helps keep a series of folders with images synchronized to SmugMug with one click of a button. I just made a few fixes in the past couple of days and uploaded a new version.

Changes:

  • Fixed error where the application would crash after completely scanning and uploading all files. This crash would cause it to do unnecessary scanning (and possibly uploading) the next time it was run.
  • Added support for GIF and PNG files (JPG files are still supported of course).
  • Increased timeout for uploads to 10 minutes. If an upload takes longer than 10 minutes, it will fail.
  • Improved special character handling. File names including characters such as "&" should now be handled properly.
  • Reworded a few of the settings to better explain their function.
  • Added an error display — if the application should have an unexpected problem, it should provide a way to grab the error (so that you can submit to the author).

Download it here.

Annoying C# Web Exception …

System.Net.WebException

The request was aborted: The request was canceled.

Cannot close stream until all bytes are written.

If you’re getting that exception, make sure that the timeout for the webrequest is set sufficiently to handle the request. The default as of .NET 3.5 SP1 seems to be 100 seconds. I’m working on an fix to SnugUp and discovered that large files would throw the exception above. I thought it must be a problem on the SmugMug side, but couldn’t come up with a rational reason why it would just fail with my application … and then it dawned on me that it was closing the stream early because it had exceeded the timeout!

So, if you’ve seen that exception, and can’t figure it out … consider checking the timeout. (Also, verify the content-length is set properly – that’s another reason this exception might be thrown).