Exception thrown in EPiServer.Cms.Shell.Service.Internal.ContentService.SaveMedia


Hi all, 

When we replace an image in the CMS, we keep seeing an error:

"Timed out, or max file size exceeded"

We investigated all the solutions available online, but nothing worked. 

Eventually we decompiled your code and found that an exception is thrown when you try to cast IContentMedia to IContent: 


This only happens when we replace an image. Not when we upload a new image. 

Steps to reproduce: 

  1. Be on Episerver 11
  2. Upload an image
  3. Upload an image with the same name


Image should upload with no error


"Timed out, or max file size exceeded"

Any ideas on a solution? 

Edited, Jun 26, 2018 10:46
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.