Friday, February 24, 2012

aspnetdb connection string

Hello,
I'm getting up to speed with VS2005 and use SQL Server 2005. I'm using the login control in a test web app.

When I run the app I get this error:

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

The connection string I'm using is:

data source=localhost;Integrated Security=SSPI;Initial Catalog=aspnetdb;

The AspNetSqlProvider in the web administration tool connects to the database.

My question is, Is this a connection string issue, and user ID issue, a rights issue or is it something else?

Thanks,

Gaikhe

This is a permission issue on SQL, which indicates theUserID\ASPNETlogin dose not have sufficient permission to perform specific task(access in this case) on theaspnetdb database. You should add database mapping for this account to theaspnetdb database: open ManagementStudio->Explore the SQL instance->Security->Logins->view the properties of theUserID\ASPNETlogin->switch toUser Mapping tab-> add proper mapping and permission to the login.

No comments:

Post a Comment