RESOLVED: Upload file to Sitecore 8 Media Library causes Input string was not in a correct format error

Apparently there is a bug in Sitecore 8 Update 3 (rev. 150427), when you try to upload a file that is 0 Bytes in length, you get the below exception:

Server Error in '/' Application.

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

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:

[FormatException: Input string was not in a correct format.]   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14292453   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +305   Sitecore.Shell.Applications.FlashUpload.Simple.SimpleUploadPage.OnQueued(String filename, String lengthString) +93
[TargetInvocationException: Exception has been thrown by the target of an invocation.]   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +211   Sitecore.Web.UI.XamlSharp.Xaml.XamlControl.ExecuteAjaxMethod(AjaxMethodEventArgs e) +184   Sitecore.Web.UI.WebControls.AjaxScriptManager.DispatchMethod(Control control, String parameters) +423   Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +398   Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic) +366   Sitecore.Web.UI.WebControls.ContinuationManager.RunPipelines() +255   Sitecore.Web.UI.WebControls.ContinuationManager.OnPreRender(EventArgs e) +226   System.Web.UI.Control.PreRenderRecursiveInternal() +113   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Control.PreRenderRecursiveInternal() +222   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297
Solution: Do not upload 0 Bytes file until Sitecore fixes the bug. :)

UPDATE: Sitecore provided a resolution for the ticket: Changing the "Upload.Classic" setting to true fixes the issue.


  1. This comment has been removed by a blog administrator.

  2. Top Technologies to learn

    Excellent blog with lots of information. I have to thank for this. Do share more.

  3. I would like to say thank you for the amazing details and concepts you are sharing in this.The style of writing is excellent and also the content is top-notch.

    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery

  4. German Classes In Chennai

    I am glad that I have visited this blog. Really helpful, eagerly waiting for more updates


Post a Comment

Popular posts from this blog

RESOLVED: Sitecore Solr provider error: Value cannot be null. Parameter name: fieldNameTranslator.

Experience Marketing: The Crawl, Walk, Run of Sitecore - Part 1 - The Crawl Phase