locked
System.Data.SqlClient.SqlException: Login failed for user 'DESKTOP-SBLF5UV\SCOT'. RRS feed

  • Question

  • User-1767698477 posted

    My computer went haywire with my previous installation of Sqlserver 2014. I tried for a whole month to try to remove it and get it back on my computer. Everything would install except for the Sqlserver instance. It became very frustrating. I managed to somehow install SqlServer 2019 and I replaced my VS2010 with VS 2019. For some reason, I can't get my website to login. From my web.config file:

    <add name="sqlConnectionString" connectionString="Connect Timeout=8; Initial Catalog=Prospect; Data Source=DESKTOP-SBLF5UV\SQLEXPRESS;integrated security=true;

    Login failed for user 'DESKTOP-SBLUV\SCOT'.
    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: Login failed for user 'DESKTOP-SBLF5UV\SCOT'.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [SqlException (0x80131904): Login failed for user 'DESKTOP-SBLF5UV\SCOT'.]
    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) +947
    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +342
    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38
    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +726
    System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +91
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +438
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +79
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +201
    System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +156
    System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +22
    System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +92
    System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +219
    System.Data.SqlClient.SqlConnection.Open() +101
    System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +90
    System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +249
    System.Web.Security.SqlRoleProvider.GetRolesForUser(String username) +845
    System.Web.Security.RolePrincipal.IsInRole(String role) +9820365
    System.Web.Configuration.AuthorizationRule.IsTheUserInAnyRole(StringCollection roles, IPrincipal principal) +103
    System.Web.Configuration.AuthorizationRule.IsUserAllowed(IPrincipal user, String verb) +183
    System.Web.Configuration.AuthorizationRuleCollection.IsUserAllowed(IPrincipal user, String verb) +193
    System.Web.Security.UrlAuthorizationModule.OnEnter(Object source, EventArgs eventArgs) +9960141
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +144
    System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73

    Sunday, January 5, 2020 11:56 PM

Answers