Unable to open the requested database in ' ASPState '. Login failed. 2009-06-11 11:09
Problem: Unable to open the requested database in ' ASPState '. Login failed. User ' Wh/administrator ' login failed. Workaround: Find from this system: C:/windows/microsoft.net/framework/v2.0.50727/installsqlstate.sql Executes the statement once in SQL Query Analyzer. |
Unable to open the requested database "albums" for login. Login failed. User ' NT Authority/system ' login failed. today, a new project, wrote a simple page, incredibly, there is such a mistake:
Unable to open the requested database "albums" for login. Login failed.
User ' NT Authority/system ' login failed.
After a long online turn, finally found a solution:
Under the "albums" Database-> Security > User > Right-click (new User) > Login (SELECT ' NT authority/system ') > then select the corresponding role member (attention permission), OK, OK. It's OK.
Note: To add user mappings to the user under Database > Login First, right-click the user name > Properties > User Mappings > Put the right database "albums" on the Hook. Are you sure.
Learned from here: http://www.cnblogs.com/pyt5208/archive/2006/08/08/471235.html
This will solve the problem. But one thing I don't understand is this: I didn't use this user, how could it fail to log in? Hope the master is not hesitate to enlighten, thank you.
To make a statement: The database is SQL Server 2005