Problem when downloading pdf from Sitecore site

Problem when downloading pdf from Sitecore site

I had a Mime-type problem when downloading pdf from Sitecore site the following error showed up in the log:

8368 10:31:54 ERROR Application error.
Exception: System.ArgumentOutOfRangeException
Message: The UTC time represented when the offset is applied must be between year 0 and 10,000.
Parameter name: offset
Source: mscorlib
   at System.DateTimeOffset..ctor(DateTime dateTime)
   at Sitecore.Resources.Media.Streaming.Preconditions.IfRangePrecondition.CheckRequestPreconditionAndSetResponseStatus(HttpContext context)
   at Sitecore.Resources.Media.Streaming.RangeRetrievalResponse.ExecuteRequest(HttpContext context)
   at Sitecore.Resources.Media.MediaRequestHandler.DoProcessRequest(HttpContext context, MediaRequest request, Media media)
   at Sitecore.Resources.Media.MediaRequestHandler.DoProcessRequest(HttpContext context)
   at Sitecore.Resources.Media.MediaRequestHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Sitecore MimeConfig

This turned out to be a problem with MIME-types, and to solve it download the MimeConfig and add a reference to it in web.config as described in this Sitecore documentation.

Open the file and make sure that a mime entry for PDF exists and make sure it is not commented out.