Error while trying to connect to SQL 2005 from ASP.Net

T

Tim Zych

When I try to connect to a sql server database using Windows Authentication,
I get a message that the login failed:

Cannot open database "codelib" requested by the login. The login failed.
Login failed for user ABCD\ASPNET'.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database
"codelib" requested by the login. The login failed. Login failed for user
ABCD\ASPNET'.

Can anyone help? Thx
 
J

Juan T. Llibre

You are connecting using ABCD\ASPNET as the database user,
but that user doesn't have permission to access the codelib database.

Either create a database login for ABCD\ASPNET or change to
mixed authentication mode and use any user you want to use,
as long as the user has a login for that database.
 
T

Tim Zych

Awesome...thanks for the help. It works now.


Juan T. Llibre said:
You are connecting using ABCD\ASPNET as the database user,
but that user doesn't have permission to access the codelib database.

Either create a database login for ABCD\ASPNET or change to
mixed authentication mode and use any user you want to use,
as long as the user has a login for that database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top