This is a migrated thread and some comments may be shown as answers.

Error: Image stream seems to be causing issues

4 Answers 158 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Mark Callan
Top achievements
Rank 1
Mark Callan asked on 23 Sep 2013, 03:44 PM
I decided to post this issue in the ImageEditor section as the EditableImage class relates to this control. 

We have implimented uploading to a ashx file which takes an uploaded image, resizes it, and then saves it to a database.  This works fine on all of our servers except for one particular server in production.  This server is a virtual server.  Any images uploaded to it that are larger than 1mb seem to throw this error...

Telerik.Web.UI.MissingEditableImageException: Image stream seems to be causing issues at Telerik.Web.UI.ImageEditor.EditableImage.TryLoadingImage(Stream stream) at Telerik.Web.UI.ImageEditor.EditableImage..ctor(Stream stream) at FsiWeb.FsiWebAdmin.CMS.ImageManager.btnSaveImage_OnClick(Object sender, EventArgs e) in ...

We also upload documents in this fashion as well and they work just fine, large sizes and all.  I do not understand why the EditableImage class would work on all servers except this one. 

Has anyone encountered this problem?  It seems to be a server configuration issue but I cannot pinpoint what it might be.  We are using .NET 3.5, Telerik Q2 SP1 release.  I can duplicate the issue in Chrome and IE.  Any help would be appreciated.

Thanks,
Mark

4 Answers, 1 is accepted

Sort by
0
Mark Callan
Top achievements
Rank 1
answered on 23 Sep 2013, 04:04 PM
Just some additional information.  We encountered this problem both with a regular ASP FileUpload control and using the AsyncUpload.  So I do not think this is related to AsyncUpload.  
0
Vessy
Telerik team
answered on 25 Sep 2013, 07:13 AM
Hello Mark,

I have already answered your support ticket on the subject, for convenience I will paste my answer here as well:

Could you verify that  the fuplImage.PostedFile.InputStream length is more than 0 at the time where the error occurs? If so, a similar issue was discussed in this ASP.NET tread - FileUpload.PostedFile.InputStream.Length equals 0

Additionally, could you try the upload approach shown in this demo and see whether the problem still persists?

Regards,
Veselina Raykova
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Mark Callan
Top achievements
Rank 1
answered on 18 Dec 2013, 03:07 PM
I have done a tremendous amount of research on this issue and it boils down to a system out of memory exception.  Here is a page I found which adequately explains issues programmers will encounter when resizing images on their server.

http://www.nathanaeljones.com/blog/2009/20-image-resizing-pitfalls


I ended up using ImageResizer as it tends to throw the correct Out of Memory exception.  Basically, if you are resizing images in a 32-bit web app environment, the .NET service can only allocate so much memory approximately 2g is the max.  it is easy to run out of memory if you are resizing images of a high resolution and dimension.  In my case I was trying to resize a 240 dpi 5000 x 3000 image.  Our server simply could not handle it.  The telerik ImageEditor should in my opinion throw an error more appropriate with the System.Out of memory exception.  

I hope this helps future people.
0
Vessy
Telerik team
answered on 19 Dec 2013, 01:40 PM
Hi Mark,

Thank you for sharing your the result of your investigation with us. We will delve a little bit more on the subject and update the ImageEditor's documentation with the needed information.

Feel free to contact us in case we could be of any further assistance.

Regards,
Veselina Raykova
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ImageEditor
Asked by
Mark Callan
Top achievements
Rank 1
Answers by
Mark Callan
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or