locked
VS2013 Net 4_5_2 IIS7 signinManager.PasswordSignIn RRS feed

  • Question

  • User-1877975950 posted

    I am on hols for a week. Please help if  you can.

    Expected Result:

    When using IIS with website user accounts then a user should be able to login with no issues.

     Actual Result:

    After publishing to local IIS, DefaultConnection security string to MSSQLMS shows 'DOMAIN/USER$' as sql user not found when in fact  var signinManager = Context.GetOwinContext().GetUserManager<ApplicationSignInManager>(); from Login.aspx.cs shows the user and password hash for all website users.

     

    Recreating this bug:

    I created a VS2013 aspx project (with MVC and webservices) and Individual Security Accounts, build and run project in debug. Add a user to create the localDB database and connection string. Change connection string to use local MSSQL server. Build and run project no probs. Create a user (localhost). Publish to IIS. Data is returned fine from the same MSSQL server (ApplicationData database). When logging in then receive error:

    An exception of type 'System.Data.SqlClient.SqlException' occurred in mscorlib.dll but was not handled in user code. Additional information: Login failed for user 'DOMAIN\workstation$'.

    MSSQLMS logs show the sql user not found. MSSQL profiler does not show the transaction.

    The strange thing is that in Login.aspx.cs 'var signinManager = Context.GetOwinContext().GetUserManager<ApplicationSignInManager>();' shows all the users' details. The fail is on execution of 'var result = signinManager.PasswordSignIn(Email.Text, Password.Text, RememberMe.Checked, shouldLockout: false);'.

    I have added the user to MSSQL server Security, database and at the Table level.

     

    Friday, March 20, 2015 11:47 AM

All replies

  • User134010096 posted

    Please share the exception message, it will help us to found the reason.

    Tuesday, March 24, 2015 3:34 AM
  • User-1877975950 posted

    An exception of type 'System.Data.SqlClient.SqlException' occurred in mscorlib.dll but was not handled in user code. Additional information: Login failed for user 'DOMAIN\workstation$'.

    Works fine on IIS Express local server, but not IIS7. Users cannot login. I have added the domain/workstation$ user to the MS SQL Server database (V12).

    Tuesday, March 31, 2015 11:08 AM