Last post Mar 31, 2015 11:08 AM by Stewa11
Mar 20, 2015 11:47 AM|Stewa11|LINK
I am on hols for a week. Please help if you can.
When using IIS with website user accounts then a user should be able to login with no issues.
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.
Mar 24, 2015 03:34 AM|Ming Zhao|LINK
Please share the exception message, it will help us to found the reason.
Mar 31, 2015 11:08 AM|Stewa11|LINK
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).