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

  • Thread starter Thread starter dryer
  • Start date Start date
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.
 
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"
 
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
 
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.
 
Back
Top