473,472 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Word attachment on windows 2003 / iis6

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.
Nov 18 '05 #1
2 1373
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?

--
Regards

John Timney
ASP.NET MVP

"sqlboy2000" <sq********@hotmail.com> wrote in message
news:49**************************@posting.google.c om...
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.

Nov 18 '05 #2
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....
"John Timney \(ASP.NET MVP\)" <ti*****@despammed.com> wrote in message news:<eW**************@TK2MSFTNGP11.phx.gbl>...
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?

--
Regards

John Timney
ASP.NET MVP

"sqlboy2000" <sq********@hotmail.com> wrote in message
news:49**************************@posting.google.c om...
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.

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jeffrey Tate via DotNetMonster.com | last post by:
The error is: The proxy settings on this computer are not configured correctly for Web discovery. MSDN states that this is caused by: This error appears in the Add Web Reference dialog box if...
12
by: Steve | last post by:
I've been building an application that will merge fields in a text file with a word template, save the resulting word file out to the user's hard drive, and then email the file as an attachment. ...
0
by: royan | last post by:
Help please! I have the same problem which this post ...
6
by: royan | last post by:
Help please! I have the same problem which this post ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.