Forum Moderators: open
Suddenly, some clients are getting a dialog box prompting them to download the content. They don't have the option to read it directly. I believe the problem was introduced by MS Security patches applied to the browsers. So far, it seems that IE 6 clients are OK, but not IE 5.x, but that's far from certain. The 5.x clients can read regular word docs, just not the ones I'm serving through my .net page.
I suspect the problem has to do with HTTP put headers, but I can't figure out how to view them. This is behind a firewall, and so I can't use the available utilities.
Will IIS 6 log put headers? Other thoughts? I need to get this fixed ASAP, so I appreciate your comments.
Thanks,
Toss
Here are headers from the one that won't display:
Server: Microsoft-IIS/5.0
Date: Fri, 05 Dec 2003 00:53:02 GMT
Accept-Ranges: bytes
Transfer-Encoding: chunked
Cache-Control: private
Content-Type: application/msword; charset=utf-8
and here are headers from the one that will:
Server: Microsoft-IIS/5.0
Date: Fri, 05 Dec 2003 01:01:34 GMT
Content-Type: application/msword
Accept-Ranges: bytes
Last-Modified: Fri, 03 Oct 2003 21:33:48 GMT
ETag: "c023e87f689c31:8f7"
Content-Length: 225280
Thoughts, oh brilliant ones?
Any comentary on what the Etag is or Transfer-Encoding?
Thanks again,
Ross
The ContentType property of a Response object automatically appends a character set attribute to the Content-Type string.
Example:
Content-Type: application/msword; charset=utf-8
Classic ASP didn't add this character set attribute by default - but ASP.NET is "nice" enough to automatically add it for you (even though it breaks things in this case).
The solution is to set the Response.Charset property to "".
Example:
Response.ContentType = "application/msword"
Response.Charset = ""
You can read all the nitty-gritty details in the following KB article: