What account is ASP.NET using?, it's not ASPNET!

D

dryer

I have a web app that runs fine on my local machine (W2K pro), but when ran on
Windows 2003 server there is a glitch. I have a function that writes an XML doc
to a directory, but I can't figure out what account the 2003 server is using. I
gave ASPNET write privilges to the directory, but get 'Access Denied' errors.
When I gave permmisions to 'Authenticated Users' it works fine. So I went
through the whole list of users and nothing would let the app run, only when I
add one of the groups, ie 'Everybody', 'Users', 'Authenticated Users', etc. does
it work. machine.config is set to use the ASPNET, any ideas on what's going
on??

Thanks.
 
H

Hans Kesting

dryer said:
I have a web app that runs fine on my local machine (W2K pro), but when ran on
Windows 2003 server there is a glitch. I have a function that writes an XML doc
to a directory, but I can't figure out what account the 2003 server is using. I
gave ASPNET write privilges to the directory, but get 'Access Denied' errors.
When I gave permmisions to 'Authenticated Users' it works fine. So I went
through the whole list of users and nothing would let the app run, only when I
add one of the groups, ie 'Everybody', 'Users', 'Authenticated Users', etc. does
it work. machine.config is set to use the ASPNET, any ideas on what's going
on??

Thanks.

IIRC: "network services"
 
K

Ken Cox [Microsoft MVP]

Hi Dryer,

Here's some code that should help you discover who you're dealing with on a
given page:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
lblVersion.Text = _
System.Reflection.Assembly.GetExecutingAssembly _
().GetName().Version.ToString
' Put the authenticated account and
'database name at the bottom of the default page
Dim wi As System.Security.Principal.WindowsIdentity = _
WindowsIdentity.GetCurrent
lblServer.Text = _
Request.ServerVariables("SERVER_NAME")
lblAuthenticatedUser.Text = wi.Name
End Sub
 
D

dryer

Ken,

Great code, thanks alot.

dryer

Ken Cox [Microsoft MVP]" said:
Hi Dryer,

Here's some code that should help you discover who you're dealing with on a
given page:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
lblVersion.Text = _
System.Reflection.Assembly.GetExecutingAssembly _
().GetName().Version.ToString
' Put the authenticated account and
'database name at the bottom of the default page
Dim wi As System.Security.Principal.WindowsIdentity = _
WindowsIdentity.GetCurrent
lblServer.Text = _
Request.ServerVariables("SERVER_NAME")
lblAuthenticatedUser.Text = wi.Name
End Sub


dryer said:
I have a web app that runs fine on my local machine (W2K pro), but when ran on
Windows 2003 server there is a glitch. I have a function that writes an XML doc
to a directory, but I can't figure out what account the 2003 server is using. I
gave ASPNET write privilges to the directory, but get 'Access Denied' errors.
When I gave permmisions to 'Authenticated Users' it works fine. So I went
through the whole list of users and nothing would let the app run, only when I
add one of the groups, ie 'Everybody', 'Users', 'Authenticated Users', etc. does
it work. machine.config is set to use the ASPNET, any ideas on what's going
on??

Thanks.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top