[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Authentication Problems NT AUTHORITY\NETWORK SERVICE

Posted on 2006-03-21
5
Medium Priority
?
865 Views
Last Modified: 2008-03-10
I''m trying to get my asp.net/sql server2005 app running under IIS 6.  The DB connection is working fine in visual studio environment, but when I try and access the DB through localhost, it crashes, saying that NT AUTHORITY\NETWORK SERVICE is not a valid login.

I grant access to the NT Authority user using the following code:

exec sp_grantlogin N'NT AUTHORITY\NETWORK SERVICE'
go

exec sp_grantdbaccess N'NT AUTHORITY\NETWORK SERVICE'
go

and then the login error stops.  BUT, now it throws an error saying that the stored procedure 'x' doesn't exist.  The sproc clearly exists, and I've confirmed that it's still attempting to access the correct DB.  Do I also have to grant access to the SPROCS?

Any insight is appreciated.

Scott.

0
Comment
Question by:tradeline
2 Comments
 
LVL 2

Accepted Solution

by:
pjdee earned 1000 total points
ID: 16256598
if you grant access to a user you have to then give it priviledges within SQLServer

Give the SQL user execute permissions on the stored procedure and see if it can then find sproc 'x'

0
 
LVL 7

Assisted Solution

by:IT-Schubertz
IT-Schubertz earned 1000 total points
ID: 16256999
Hi,

even if this should solve your problem, it is absolutely dangerous.
Anyone that connects to your localhost from a remote machine will be able to execute your pages and gains access to the database.
Better would be to impersonate the database connection by reading the user credentials in your ASP.NET code and changing the connection strings
your app uses to SSPI=true.
this way you won't have  a security preach between your network security and SQL Server security

HTH

Andy
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question