I have an ASP.NET MVC application that creates a PDF file when an action is called on one of the controllers. The PDF file displays correctly in Chrome and Firefox, but when I try to open the PDF in IE, a blank HTML page appears.
The HTTP response looks like this (in Fiddler):
HTTP/1.1 200 OK Cache-Control: no-cache, no-store Pragma: no-cache Content-Type: application/pdf Expires: -1 Server: Microsoft-IIS/7.5 X-AspNetMvc-Version: 2.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Tue, 01 Feb 2011 09:48:53 GMT Content-Length: 3176569 <<PDF content>>
When I create a view source in IE, the following HTML appears:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD> <BODY></BODY></HTML>
The action is requested from a Silverlight 4 application.
If anyone knows about some of the quirks IE interprets the HTTP protocol, answer - this may solve my problem. The request is executed over the HTTPS protocol.
source share