Word attachment on windows 2003 / iis6

  • Thread starter Thread starter sqlboy2000
  • Start date Start date
S

sqlboy2000

All,
I've used the following code in several projects without issue:

Response.ContentType = "Application/msword"
Response.AddHeader ( "Content-Disposition", "attachment;
filename=Report.doc" )

If you're familiar with it, it simply causes the webpage to be
rendered as a word attachment. This works fine in my .aspx page on my
machine (win xp pro). But when I deploy it to our production web
server (win2k3, IIS6, latest patches), when I launch the page I get
prompted for my login information. Even if I provide my correct
windows login (plus I've tried several other valid accounts that have
access to this folder), it rejects my login and keeps popping up the
login prompt. There is no way to get past this with any account so I
can never get the .doc file.

The site is using windows authentication (no anon). I am prompted to
log in when I first hit the site (as I should be) and this works fine.
The only page that is doing this is the one with the word content
disposition header.

Anyone seen this?

Thanks.
 
are you enabling impersonation - you might well have the permission but if
the asp.net app is not impersonating you it may not be able to access the
doc file to stream to you?
 
I don't think so, I don't see anything in my web.config.
I was able to set up the site on a different IIS6 machine and it works
fine. I just can't figure out what is different between the two
machines that would be causing this. The folder permissions appear
identical....
 
Back
Top