Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Word attachment on windows 2003 / iis6

Reply
Thread Tools

Word attachment on windows 2003 / iis6

 
 
sqlboy2000
Guest
Posts: n/a
 
      11-16-2004
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.
 
Reply With Quote
 
 
 
 
John Timney \(ASP.NET MVP\)
Guest
Posts: n/a
 
      11-16-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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.



 
Reply With Quote
 
 
 
 
sqlboy2000
Guest
Posts: n/a
 
      11-17-2004
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\)" <(E-Mail Removed)> wrote in message news:<eWa$(E-Mail Removed)>...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application_BeginRequest Not called on IIS6 Windows 2003 server =?Utf-8?B?TWFydGlu?= ASP .Net 0 08-03-2006 07:13 AM
asp.net IIS6 windows 2003 web service wonders!(Urgent help needed) Bredal Jensen ASP .Net 3 12-25-2005 06:59 PM
Problem with Excel Automation in ASP.net on IIS6 & Windows 2003 Sam Vanderstraeten ASP .Net 1 12-09-2005 12:10 PM
ASP.Net server too busy on Windows 2003/IIS6 Raymond ASP .Net 3 07-02-2004 08:54 PM
url rewriting giving 404 error when host site with windows 2003 server and iis6.0 sandeep pandit via .NET 247 ASP .Net 0 04-28-2004 10:54 AM



Advertisments