Error: Image stream seems to be causing issues

5 posts, 0 answers
  1. Mark Callan
    Mark Callan avatar
    10 posts
    Member since:
    Oct 2005

    Posted 23 Sep 2013 Link to this post

    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
  2. Mark Callan
    Mark Callan avatar
    10 posts
    Member since:
    Oct 2005

    Posted 23 Sep 2013 Link to this post

    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.  
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 25 Sep 2013 Link to this post

    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.
  5. Mark Callan
    Mark Callan avatar
    10 posts
    Member since:
    Oct 2005

    Posted 18 Dec 2013 Link to this post

    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.
  6. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 19 Dec 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017