Try adding
Response.End();
after the call to Response.BinaryWrite().
You may inadvertently be sending other content back after Response.BinaryWrite which may confuse the browser. Response.End will ensure that that the browser only gets what you really intend.
More Related Contents:
- How to get Windows Explorer type look and feel inside my Application? [closed]
- Determine if a number can be made with prepicked numbers and times
- The provider is not compatible with the version of Oracle client
- Best way in asp.net to force https for an entire site?
- How to get the public IP address of a user in C#
- Return View as String in .NET Core
- Entity Framework Refresh context? [closed]
- Can I get more than 1000 records from a DirectorySearcher?
- Clearing Page Cache in ASP.NET
- Pulling data from a webpage, parsing it for specific pieces, and displaying it
- Adding your own HtmlHelper in ASP.NET MVC 3
- IEnumerable doesn’t have a Count method
- Adding custom properties for each request in Application Insights metrics
- Easiest way to parse “querystring” formatted data
- How can I remove item from querystring in asp.net using c#?
- No authenticationScheme was specified, and there was no DefaultChallengeScheme found with default authentification and custom authorization
- How to add cross domain support to WCF service
- ASP.NET File Upload
- How does Request.IsAuthenticated work?
- asp.net Button OnClick event not firing
- Recursive TreeView in ASP.NET
- Index (zero based) must be greater than or equal to zero
- Get All Web Controls of a Specific Type on a Page
- Full postback triggered by LinkButton inside GridView inside UpdatePanel
- Unable to find the requested .Net Framework Data Provider. It may not be installed
- GeneralLink in Sitecore
- Change cell color on different values – Gridview
- asp.net web service using office 2010 COM
- Bind Dictionary with list in viewmodel to checkboxes
- Opposite of [compare(” “)] data annotation in .net?