error to attaching Database

Mar 19, 2012 at 3:56 PM

hi,

when i trying to attach the Database with my SQL server 2008 then it is showing the following error:

Cannot open user default database. Login failed.
Login failed for user 'Sharik-PC\DOT NET'.

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 'Sharik-PC\DOT NET'.

Source Error:

Line 26:             // the albums with the highest count
Line 27: 
Line 28:             return storeDB.Albums
Line 29:                 .OrderByDescending(a => a.OrderDetails.Count())
Line 30:                 .Take(count)


Source File: F:\DotNet\OnlineShopping\MvcMusicStore\Controllers\HomeController.cs    Line: 28

Stack Trace:

 

 

 

please help me


Mar 26, 2012 at 7:31 PM

Im having the same issue when I try to Authenticate, I can add/edit albums but cannot log in:

 

Cannot open user default database. Login failed.
Login failed for user 'Marco-PC\Marco'.

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 'Marco-PC\Marco'.

Source Error:

Line 25:             if (ModelState.IsValid)
Line 26:             {
Line 27:                 if (Membership.ValidateUser(model.UserName, model.Password))
Line 28:                 {
Line 29:                     FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe);


Source File: C:\Users\Marco\Documents\Visual Studio 2010\Projects\Wabas\MvcApplication1\Controllers\AccountController.cs    Line: 27             

Mar 26, 2012 at 7:31 PM
Edited Mar 26, 2012 at 7:44 PM

Im having the same issue when I try to Authenticate, I can add/edit albums but cannot log in. Im using Sql CE and Visual Studio 2010 by the way:

 

Cannot open user default database. Login failed.
Login failed for user 'Marco-PC\Marco'.

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 'Marco-PC\Marco'.

Source Error:

Line 25:             if (ModelState.IsValid)
Line 26:             {
Line 27:                 if (Membership.ValidateUser(model.UserName, model.Password))
Line 28:                 {
Line 29:                     FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe);


Source File: C:\Users\Marco\Documents\Visual Studio 2010\Projects\Wabas\MvcApplication1\Controllers\AccountController.cs    Line: 27