By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,365 Members | 3,095 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,365 IT Pros & Developers. It's quick & easy.

Can't save as from an Excel document opened in browser

P: n/a
I have a ASP.NET web application written using VB.NET. I have a data
grid, that is sent to the browser as an excel document using the
following code

Private Sub CreateXLS(ByVal xdatagrid As DataGrid)
Response.Clear()
Response.AddHeader("content-disposition",
"filename=New_Report.xls")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.No Cache)
Response.ContentType = "application/vnd.ms-excel"
Dim stringWrite As System.IO.StringWriter = New
System.IO.StringWriter
Dim htmlWrite As System.Web.UI.HtmlTextWriter = New
HtmlTextWriter(stringWrite)
xdatagrid.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString)
Response.End()
End Sub
When this function is run, the user is prompted and asked whether they
want to save or open the file. Saving works properly - saving the file
directly to their local hard drive, and opening works properly - opening
the spreadsheet in the browser.

However, when a user first opens the file in the browser, then tries to
do a "save as" to save the file locally, they are prompted with a dialog
box asking for authentication. If they cancel, the dialog box disappears
and they are unable to save. The server that this is hosted on is
Windows 2003 Server Standard edition. Users are using Excel 2003.

How can I get rid of this authentication prompt?

Any help is greatly appreciated!

Sincerely,
Matt Schwartz
Jun 9 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.