Unable to ExecuteScalar() because of authentication error

0

I am following a Microsoft tutorial for setting up forms-based authentication, and getting a failure.

Here is the tutorial:

https://support.microsoft.com/en-sg/help/301240/how-to-implement-forms-based-authentication-in-your-asp-net-applicatio

This line is failing:

// Execute command and fetch pwd field into lookupPassword string.
lookupPassword = (string) cmd.ExecuteScalar();

I am getting this error:

System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'HOME\TSLAB1$'. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)

TSLAB1 is the name of the server. I expected to see the SQL user here instead, NOT the windows user.

asp.net
authentication
iis
asked on Stack Overflow Feb 1, 2019 by Vic Street

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0