Parameter is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Parameter is not valid.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Parameter is not valid.]
System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) +1144773
ImageProcessor.Common.Extensions.ImageExtensions.Copy(Image source, AnimationProcessMode animationProcessMode, PixelFormat format, Boolean preserveExifData) +589
ImageProcessor.ImageFactory.Load(Stream stream) +332
ImageProcessor.Web.HttpModules.
I haven't encountered this specific issue personally, so it might be a bit of a shot in the dark, but I've known of a few instances where the "parameter is not valid" exception occurs as a consequence of an OutOfMemoryException when trying to process a file.
It could be that it's running the process in 32-bit on Azure, rather than 64-bit, causing the exception and throwing the error. This might explain why everything runs fine locally but not on the live site.
Ah, I see... that's ashame that didn't resolve things for you!
I think this still might have something to do with available memory on your server - it's the only thing that seems to ring a bell (and make sense).
See here the following issues (same error as the one you've encountered), which make reference to that and provide some more detailed explanations on it.
If you're just looking for a quick-fix, I suppose you could always resize the original image in the media folder manually and then re-upload it to the back-end.
Granted, it's not the most glamorous of solutions, but it should do the trick!
Image issues
Hi
We've got a funny on a production site , on Azure - as a web application
All images are going via image processor
The site is on Umbraco version 7.10.4
https://www.sitename.co.uk/media/1044/hands-on-blueprints_4460x4460.jpg?anchor=center&mode=crop&width=400&height=300&rnd=131695627660000000
Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Parameter is not valid.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Parameter is not valid.] System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) +1144773 ImageProcessor.Common.Extensions.ImageExtensions.Copy(Image source, AnimationProcessMode animationProcessMode, PixelFormat format, Boolean preserveExifData) +589 ImageProcessor.ImageFactory.Load(Stream stream) +332 ImageProcessor.Web.HttpModules.
We're mirrored the site locally and it works
Has anyone seen this issue before ?
Regards
I haven't encountered this specific issue personally, so it might be a bit of a shot in the dark, but I've known of a few instances where the "parameter is not valid" exception occurs as a consequence of an OutOfMemoryException when trying to process a file.
It could be that it's running the process in 32-bit on Azure, rather than 64-bit, causing the exception and throwing the error. This might explain why everything runs fine locally but not on the live site.
Thanks Rhys,
Thanks for the reply.
We've switched it to 64 bit, stopped and restarted the site but the error still occurs.
Regards
Ah, I see... that's ashame that didn't resolve things for you!
I think this still might have something to do with available memory on your server - it's the only thing that seems to ring a bell (and make sense).
See here the following issues (same error as the one you've encountered), which make reference to that and provide some more detailed explanations on it.
If you're just looking for a quick-fix, I suppose you could always resize the original image in the media folder manually and then re-upload it to the back-end.
Granted, it's not the most glamorous of solutions, but it should do the trick!
@Nicholas did you find a solution to your problem? I´m experiencing a similar one.
On a Umbraco instance running on Azure Application Service we were able to solve the issue by switching the platform from 32bit to 64bit.
is working on a reply...