Wednesday, March 28, 2012

Installing Microsoft SQL server management studio express broke my asp.net databases

Morning,

I installed the managerment stuid on my machine and now none of my database connections seem to work any more. I keep getting the attached error. Before I installed the studio the system worked fine, I could connect to the database and everything was fine. Does the studio change any permission stuff? I cannot seem to get it to work again at all now, I added in aspnet as a login inside the studio and it still won't let me connect to the database. I cannot find *any* logs anywhere that might be helpful in what it is doing or see any way to debug the connection to find out what the problem is. When I look at the permissions inside of the studio it shows me that the connections should all be fine.

I checked and remote and local connections are setup, although it is only doing local connections anyway since this is a asp.net web server page.

Any idea what the problem is here? This is very frustrating and annoying :( Since I didn't change anything and now nothing I will do gets it to work. I even tried to uninstall the management tool and it still doesn't work.

Cannot open user default database. Login failed.
Login failed for user 'GREENANDFLUFFY\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 user default database. Login failed.
Login failed for user 'GREENANDFLUFFY\ASPNET'.

I have posted a solution (that works for me) here.

And there are other solutions in that older post.

|||Simply set the user dafault database for the user to a database which is existing and accessible to him, either with the procedure sp_defaultdb or via the management Studio.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de|||It was working just fine till I installed the management studio though. What could that possibly be doing to muck with the permissions?

I checked and the user has the default database as master and it definately has access to it. None of the other solutions on this page worked either.

I am really really really unimpressed with this current situation, it is a terrible user experience.|||Make also sure that the database mentioned in the connection string (depending on your provider you are using, for .NET it should be "Initial Catalog" is existing and accessible to the user. if you didn′t configure the user extensivly just drop anbd recreate him. i don′t know which administrative tasks you did prior to this problem, but this should "reset" the settings. make also sure that the user is not in a group which has access denied in the database you are redirecting to. These right will be inherited to the user as restrictive right will always overwrite granted rights.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment