Consider the following scenario. You have an ASP.NET 2.0 or ASP.NET 3.5 website running on Microsoft Internet Information Services (IIS). The website has the .pdf file extension mapped to the ASP.NET 2.0 ISAPI Aspnet_isapi.dll file. Additionally, you have configured the System.Web.StaticFileHandler http Handler to handle the .pdf extension.
You attempt to browse to a .pdf file on the website using Microsoft Internet Explorer, and you have the Adobe Reader plug-in installed in the browser. While downloading the .pdf file, Internet Explorer hangs and the download does not complete. At the same time, the following exception error message is logged in the Application event log of the IIS server:
Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Exception information:
Exception type: ArgumentException
Exception message: Object must be an array of primitives.
Parameter name: src
Request information:
Request URL: http://localhost/test.pdf
Request path: /test.pdf
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at System.Web.StaticFileHandler.ProcessRangeRequest(HttpContext context, String physicalPath, Int64 fileLength, String rangeHeader, String etag, DateTime lastModified)
at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context)
at System.Web.StaticFileHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)