-1

Reviewing my log find this exception, but can't figure out how it should be fixed, any ideas?

ImageResizer.ImageProcessingException (0x80004005): Image Resizer: No image encoder was found for the request.
   в ImageResizer.InterceptModule.HandleRequest(HttpContext context, String virtualPath, NameValueCollection queryString, IVirtualFile vf)
   в ImageResizer.InterceptModule.CheckRequest_PostAuthorizeRequest(Object sender, EventArgs e)
   в System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   в System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

And if there such place in the configuration where I can listen exception and handle them properly. It's installed as a HttpModule and can figure how to handle exceptions globally.

Alexandr
  • 1,452
  • 2
  • 20
  • 42

1 Answers1

0

ImageResizer selects an encoder based on the &format= querystring value.

The most common cause of this error is a typo, say requesting image.jpg?format=jif instead of image.jpg?format=gif.

Lilith River
  • 16,204
  • 2
  • 44
  • 76
  • Thanks, but actually I never use such query string (&format=). Is there place in the configuration of ImageResizer or sub to Event to listen exceptions and handle them properly. – Alexandr May 08 '14 at 10:23
  • That doesn't mean one of your visitors or a robot hasn't. ImageResizer throws ImageProcessingExceptions so you can identify them - how you handle unhandled app exceptions is up to you. – Lilith River May 08 '14 at 13:56
  • It's actually developers internal nonindex site, it used by marketing people. I don't think that people can do this explicitly. Can you please provide some code sample, how I can catch this in ImageResizer? I would really appreciate this. – Alexandr May 08 '14 at 14:34
  • See [How to catch unhandled exceptions in C#](http://stackoverflow.com/questions/295731/easy-way-to-catch-all-unhandled-exceptions-in-c-net). – Lilith River May 08 '14 at 19:21