Datagrid to Excel Question

  • Thread starter Thread starter Bart Lynn
  • Start date Start date
B

Bart Lynn

I have it working by the following code:

Response.Clear()

Response.Buffer = True

Response.ContentType = "application/vnd.ms-excel"

Response.Charset = ""

EnableViewState = False

Dim oStringWriter As System.IO.StringWriter

oStringWriter = New System.IO.StringWriter

Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter

oHtmlTextWriter = New System.Web.UI.HtmlTextWriter(oStringWriter)

dataGrid1.RenderControl(oHtmlTextWriter)

Response.Write(oStringWriter.ToString())

Response.End()

When I click the button, a prompt to Open or save the file. Either is fine.

The problem is when a user on our domain tries to access the file. The
websever is not on the domain. When they click the button, a popup for the
"network password" is displayed. I can't find which user is being used on
the webserver (I was thinking it was the IISASPNET one, but I guess not).
I'd rather not put the server on the domain, for several reasons. I'd rather
set the correct permission for the correct user (the guest account, or
whatever) .

Any ideas?

Bart
 
Bart,

The default anonymous user on a web server is: IUSR_[MachineName]

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Back
Top