469,632 Members | 1,698 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,632 developers. It's quick & easy.

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

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
0 1129

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Daniel | last post: by
6 posts views Thread by scottyman | last post: by
3 posts views Thread by S_K | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.