Thursday, March 22, 2012

Cant add "ComputerName\ASPNET user

I see a lot of people have this same problem, but I still can't find a solution. I keep getting a "SqlException: Login failed for user 'domain\user name'Error when I try and access my SQL db from my web app. I've tried adding the ASPNET user to my db, but am unable to. Here are the steps I took:

SQL 2000 ent manager
-Windows NT
-Logins (right Click)
-New login
-Name <click>
but once I'm here, I can't find the ASPNET user name, and I am unable to create it here, or under the database users. Any help? It works fine on my local machine.

Do I need to install the .NET framework on my SQL server?

You don't need--exactly speaking you can not create a Windows account in SQL, what you can do is just adding existing Windows account to SQL logins. So just input myserver\ASPNETas login name while choosing Windows Authenticaiton. If you can't add myserver\ASPNET and get an error saying "Windows user or group can not be found...", then check the login failure error message from .NET. What's the login name in the error message? Is it myserver\ASPNET?If you're using IIS 6.0, the login name should be 'NT AUTHROITY\NETWORK SERVICE'

No comments:

Post a Comment