Page 1 of 1

Login failed for user 'NT Authority\Network Service'

Posted: Fri Oct 09, 2009 4:31 pm
by fuhrj
I've written a report on my development PC which runs fine.

When my client tries to run it on the server within the Web Viewer, they get Login failed for user 'NT Authority\Network Service' error.

In the ASP.NET code, I use the following code to 'reset' the server connection string to the client's information:

Code: Select all

StiSqlDatabase db = (StiSqlDatabase)report.Dictionary.Databases[0];

                report.Dictionary.Databases.Clear();
                report.Dictionary.Databases.Add(new StiSqlDatabase(db.Name, connString));

                StiWebViewer1.Report = report;
The connection string does contain the username and password.

Login failed for user 'NT Authority\Network Service'

Posted: Fri Oct 09, 2009 5:07 pm
by Edward
Hi

The 'NT Authority\Network Service' user account is usually being used for setting of permissions for ASP.Net.

Error message might be a result of the attempt of accessing the folder which has not been granted access permission for
'NT Authority\Network Service' user account.

Please check connString variable. Did it contain an absolute path for the database file? Maybe the report file was placed in the folder without access permission for 'NT Authority\Network Service' user?

Also please read the following article:

http://www.codeproject.com/KB/aspnet/Ahmed_Kader.aspx

Thank you.


Login failed for user 'NT Authority\Network Service'

Posted: Sun Oct 11, 2009 7:43 am
by fuhrj
Thanks for your response.

I reviewed the article, but In this case I am not accessing a file database, but SQL Server and I am passing the UID and PWD in the conn string.

What is strange is that if I run the report on their server using the Designer, it works. It's only if it is displayed in Web that it doesn't work.

Anything else I can check?

Login failed for user 'NT Authority\Network Service'

Posted: Mon Oct 12, 2009 2:23 pm
by Edward
Hi

Please open SQL Manager Studio. Connect to the Server. Open 'Security' tab, then 'Logins'. Make sure that 'NT Authority\Network Service' user account is in the list of possible logins.

If there is no such account, please add 'Network Service' user account to the Login list.

Thank you.