Datagrid to Excel Question

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
 
S

S. Justin Gengo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top