Cannot Open default database. Invalid login for [machine name]\[username]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • namrataa
    New Member
    • Mar 2008
    • 15

    Cannot Open default database. Invalid login for [machine name]\[username]

    Cannot Open default database. Invalid login for [machine name]\[username]
    --------------------------------------------------------------------------------

    Hi,

    I have written services in WCF using C# and SQL Server 2005 which comes inbuilt with VS2008 and hosted using IIS. the service is to check for valid user and register new user.
    The problem is that the application works properly. But when I want to check the database in the server explorer I get error message saying "Cannot Open default database. Invalid login for [machine name]\[username]".

    I am not understanding what the problem is. Again when I restart my system it again gives me the error saying "Cannot Open default database. Invalid login for [machine name]\ASPNET" so at that time I go to Right click on My Computers Click on Manage-->Users-->ASPNET-->Add SQLuser.
    Log off & login again it works fine. Whats the problem & solutions also

    Pleaseeeeeeee
Working...