I''m trying to get my 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_grantdbaccess N'NT AUTHORITY\NETWORK SERVICE'

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.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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'


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

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


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.