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

  • Thread starter Thread starter Tim Zych
  • Start date Start date
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
 
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.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
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.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
Back
Top