Tuesday, March 20, 2012

Cannot Open default Database. Login Failed. Problem

I have created an app which use sqlserver exrpress and works fine. I have now craeted a authentication page login.aspx.

I have added users successfully to the asp.net configuartion via the web site admin tool.

When I go to login using my page I get the Cannot open default database.Login failed. Login failed for user servet\aspnet.

I have looked at the asonetdb in sql server management studio and the server\asp net is set up on the database.

Can anyone suggeste what I ma doing wrong or where I might see a work through of the problem.

Thanks

Frank

Please check the properties of 'server\asp net' login in SQL Server Management Studio again:

1. Find its default database in the General panel

2. In the User Mapping panel, make sure its default database has been selected and mapped to a valid user.

|||

The login seems to worjk fine when I run the app using visual web developer - when I try and logn after accessing the system conventially via a web page it doesn't let me login.

Any suggestions.

Frank

|||How do you infer the login works fine? Can you connect to the SQL Server with the login? Or you checked it in SQL logins?

No comments:

Post a Comment