Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

login failed for user...

Status
Not open for further replies.

Jesus4u

Programmer
Feb 15, 2001
110
0
0
US
I get this error:

Login failed for user 'X4355-2000\ASPNET'

I am using C# and the graphical sqlDataAdapter with the DataSet.

Now I am accessing a SQL2000 DB. Does this mean that I have to create a .NET account for the DB now?

Thanks Exams Passed: 70-152, 70-175, 70-176, 70-100
 
Yeah, you'll need an aspnet user set up in your sql server.

Just on an aside, to limit the amount of damage that baddies could do if they ever happened to hijack the user, we implemented an approach that gave access rights to ONLY stored procedures for the aspnet user and not the tables themselves. Not sure if this is viable in your setup, but just thought I'd mention it
:)

D'Arcy
 
All you have to do is add the user 'X4355-2000\ASPNET' to the SQL Server database.
 
But I don't see the user 'X4355-2000\ASPNET' in the NT list at all... Exams Passed: 70-152, 70-175, 70-176, 70-100
 
Open the Enterprise Manager for SQL2000. Choose your SQL Server. Under the Security folder select Logins. Right-Click, New Login. Click the browse button next to where you are supposed to type the user name. Click Search on the window that pops up. Search for ASPNET. Once it finds it, select it and click add. It may find several depending upon your network configurations, just make sure you select the right one. I had the same problem last night and this worked for me. Good Luck.
 
yes got it thanks Exams Passed: 70-152, 70-175, 70-176, 70-100
 
"Open the Enterprise Manager for SQL2000...."
I only have MSDE but I have tried the following... using osql

EXEC sp_grantdbaccess 'CHRIS\ASPNET', 'WebUser'
GO

GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES
ON Authors
TO WebUser
GO

which go through OK but am still not being allowed onto the table
 
You might need to download some service packs and .NET Framework files for VS .NET to find ASPNET user as part of your dropdown list for your machine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top