NT AUTHORITY/NETWORK SERVICE

G

GaryDean

We typically access sqlserver 2005 databases from our asp.net applications
by usine the NT AUTHORITY/NETWORK SERVICE user account on Server2003. It
works fine and keeps us from having to put a UID and PWD in a
connectionstring.



I'm working on a client's server2003 system now that is running Sqlserver
2000 (don't' know if that has anything to do with this issue) and I find
that there is no NT AUTHORITY/NETWORK SERVICE account.



Is the server misconfigured or does this have something to do with sqlserver
2000?



Thanks,

Gary
 
J

Juan T. Llibre

re:
!> I'm working on a client's server2003 system now that is running Sqlserver
!> 2000 (don't' know if that has anything to do with this issue) and I find
!> that there is no NT AUTHORITY/NETWORK SERVICE account.

NT AUTHORITY/NETWORK SERVICE is not listed as a user
( when you open "Manage Your Computer" and scroll down to "Local Users and Groups" and "Users" ).

You can, however, assign permissions to that account.

If you select any directory on your HDD, right-click ane select "Properties";
select the "Security" tab; click "Add"; click "Advanced" and then "Find Now",
you'll see it listed as "NETWORK SERVICE".

By double-clicking it, you can add the account to the accounts which can access the directory.
OK your way out of the dialogs and assign the poermissions you want to assign to it.

Make sureb you don't confuse it with the "NETWORK" account.
That's a different account.

You want the "NETWORK SERVICE" account
....which is the account ASP.NET runs as under W2K3.

If you want to confirm that ASP.NET is running as the "NT AUTHORITY\NETWORK SERVICE" account,
copy this file which I wrote, as "identity.aspx" and run it from any IIS directory :

identity.aspx:
-------------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = "ASP.NET is running as the account : " & tmp
End Sub
</script>
<html>
<head>
<title>What account is ASP.NET running as ?</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
-----------------

Unless you are impersonating the account ASP.NET runs as, that will return
"NT AUTHORITY\NETWORK SERVICE" when run in IIS 6.0 in W2K3.

regards,
 
G

GaryDean

I picked a directory and was able to add NETWORK SERVICE ok but when going
back to SQLServer and trying to find NETWORK SERVICE to assign ad db owner
it was still now there. any idea what might be wrong?
 
J

Juan T. Llibre

Gary,

NT AUTHORITY\NETWORK SERVICE doesn't show up for selection
purposes when you try to select a domain account in SQL Server,
but if you write in the account name, it will be accepted.
 
G

GaryDean

After typing it in in the Add Name text box in the SQL Server 2000 new login
dialog box it says...
"The account NT AUTHORITY\NETWORK SERVICE is a well known group account.
The application will not accept well known group accounts"

??
 
G

GaryDean

Juan,
Sorry - I picked the wrong dialog box. Your solution worked fine. Thank
you so much!
 
J

Juan T. Llibre

re:
!> Sorry - I picked the wrong dialog box.

Happens to the best of us.

re:
!> Your solution worked fine.

I'd been there, done that... ;-)

re:
!> Thank you so much!

You're quite welcome.
Glad to know you're up and running!
 

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,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top