469,345 Members | 6,349 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,345 developers. It's quick & easy.

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

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

Feb 3 '07 #1
2 1172
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/
===================================
"Tim Zych" <tzy---ch@NOSp@mE@RTHLINKDOTNETwrote in message
news:uh**************@TK2MSFTNGP04.phx.gbl...
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



Feb 3 '07 #2
Awesome...thanks for the help. It works now.
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eA**************@TK2MSFTNGP04.phx.gbl...
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/
===================================
"Tim Zych" <tzy---ch@NOSp@mE@RTHLINKDOTNETwrote in message
news:uh**************@TK2MSFTNGP04.phx.gbl...
>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




Feb 3 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by | last post: by
reply views Thread by Jaap Spies | last post: by
3 posts views Thread by ebrastow | last post: by
1 post views Thread by David Greenberg | last post: by
13 posts views Thread by AAaron123 | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.