Word attachment on windows 2003 / iis6

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.
 
J

John Timney \(ASP.NET MVP\)

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?
 
S

sqlboy2000

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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top