473,387 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

NT AUTHORITY\NETWORK SERVICE

My disk was replaced and i reload all my software. I think that i named my
computer best-si-01 instead of BEST-SI-01 and thats my error?

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user
'NT AUTHORITY\NETWORK SERVICE'.

I have all my software on one system. .net and sql.

the system work fine before i had reload it.
Jul 21 '05 #1
3 7173
I am assuming this is an asp.net app as you mention web requests. I would be
surprised if the machine name is incorrect. It is more likely the security on
your IIS virtual directory is not configured in the same way as it was
before. If you are using anonymous access, try changing the user account to
an account that will definately have DB access.

"Stanley J, Mroczek" wrote:
My disk was replaced and i reload all my software. I think that i named my
computer best-si-01 instead of BEST-SI-01 and thats my error?

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user
'NT AUTHORITY\NETWORK SERVICE'.

I have all my software on one system. .net and sql.

the system work fine before i had reload it.

Jul 21 '05 #2
i am using server=localhost;Trusted_Connection=true;
What else do i have to do?
stan
"Dan Kelley" wrote:
I am assuming this is an asp.net app as you mention web requests. I would be
surprised if the machine name is incorrect. It is more likely the security on
your IIS virtual directory is not configured in the same way as it was
before. If you are using anonymous access, try changing the user account to
an account that will definately have DB access.

"Stanley J, Mroczek" wrote:
My disk was replaced and i reload all my software. I think that i named my
computer best-si-01 instead of BEST-SI-01 and thats my error?

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user
'NT AUTHORITY\NETWORK SERVICE'.

I have all my software on one system. .net and sql.

the system work fine before i had reload it.

Jul 21 '05 #3
Stanley J Mroczek wrote:
i am using server=localhost;Trusted_Connection=true;
What else do i have to do?
stan
"Dan Kelley" wrote:

I am assuming this is an asp.net app as you mention web requests. I would be
surprised if the machine name is incorrect. It is more likely the security on
your IIS virtual directory is not configured in the same way as it was
before. If you are using anonymous access, try changing the user account to
an account that will definately have DB access.

"Stanley J, Mroczek" wrote:

My disk was replaced and i reload all my software. I think that i named my
computer best-si-01 instead of BEST-SI-01 and thats my error?

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user
'NT AUTHORITY\NETWORK SERVICE'.

I have all my software on one system. .net and sql.

the system work fine before i had reload it.


Stan,

The solution to this problem depends on a few things.

Is your web application using Windows Security, or does it use Web Forms
or anonymous access? If you're trying to pass along the credentials
from the end user to the database (to limit database activity based on
known users), you'll need to make sure you've got impersonation enabled
in the Web.config (search MSDN and you'll find out how to do this).

If you're just using a single login to manage all database calls, then
you'll need to configure SQL Server to allow the NETWORK SERVICE user
access.

If the database and web server are on the same box, then just ensure
that the NT AUTHORITY\NETWORK SERVICE user has been granted permissions
on the database that you are accessing.

In SQL Enterprise manager, navigate to the database that you're trying
to access. Look under Security and add a new login. Choose Windows and
then select the "NT AUTHORITY\NETWORK SERVICE" user from the list (if
it's not there, you should be able to type it in).

Within the database, grant this user permissions to use the database (I
strongly suggest that you choose individual permissions rather than make
this user a "dbo" (database owner).

You have two other options. If the SQL Server and the Web server are on
separate machines (assuming they are in the same Windows domain), you
can change the user that IIS uses to execute your web application.
You'll do that from Internet Services manager. Tinker with the settings
and see if you can figure it out. If not, I'll tell you.

Once you change the user that IIS runs your application as, you'll need
to add this user to SQL server and grant the appropriate permissions.

There is another way...

If you have configured SQL server to allow "mixed mode" security, then
you can create a SQL login for your database and change the connection
string to use SQL security rather than Trusted. You then add your new
user credentials to the connection string ("uid=username;pwd=password;").

This is WAAY more information than you needed, but the answer is in
there somewhere. ;)

Michael Earls
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Hardy Wang | last post by:
Hi all: I read an article from http://www.c-sharpcorner.com/Code/2003/Sept/InstallingWinServiceProgrammatically.asp about how to install a windows service programmatically. Based ont the code...
7
by: Mike | last post by:
I want to create a windows service that will monitor another window service. what i need for the service to do is, if a service is stopped I need it to start the service back up example: ...
9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
3
by: Jeremy S. | last post by:
On my dev machine (XP/Pro with VS.NET 2003) I have been developing a Windows Service and installing it on the local machine by opening the Visual Studio Command Prompt and then executing . Now I...
2
by: letibal | last post by:
Hello, I have written a windows service and created an installer for it. The service runs under the system accounts. When started, it launches a GUI. By default, the InteractiveProcess property...
4
by: kkt49 | last post by:
# vim: et sw=4 ts=8 sts from wxPython.wx import * import sys, os, time import pywintypes import win32serviceutil import win32service import win32event import win32process
4
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a...
3
dmjpro
by: dmjpro | last post by:
plz send me a good link which can clearify me how the J2EE framework works i want the details information .... plz help thanx
20
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for testing a sample web service application. However, the following line gives a compilation error: localhost.Service1...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.