Login failure

Donald Symmons 3,096 Reputation points
2022-05-13T09:48:11.46+00:00

I have posted many questions regarding this and don't seem to get it right. However, there is a twist to this. I think I succeeded in granting permission to the user 'quirverT', because when I tried to create a new account on my website, the error changed to this:

Server Error in '/' Application.
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
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. The login is from an untrusted domain and cannot be used with Windows authentication.

Source Error:

Line 41: cmd.Parameters.AddWithValue("@DeezNutz ", txtname.Text);
Line 42: cmd.Connection = con;
Line 43: con.Open();
Line 44: dr = cmd.ExecuteReader();
Line 45: }

Source File: g:\PleskVhosts\quirver.com\httpdocs\SignUp.aspx.cs Line: 43

Stack Trace:

[SqlException (0x80131904): Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.]
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) +1524
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +467
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +70
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +940
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +111
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1567
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +118 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +268
System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) +315 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) +128
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +265
System.Data.SqlClient.SqlConnection.Open() +133
SignUp.Button1_Click(Object sender, EventArgs e) in g:\PleskVhosts\quirver.com\httpdocs\SignUp.aspx.cs:43
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11596288
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +274
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1890

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

3 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Erland Sommarskog 138.7K Reputation points MVP Volunteer Moderator
    2022-05-13T20:53:33.943+00:00

    By default, SQL Server only accepts Windows authentication. To be able to use SQL authentication, right-click the server in Object Explorer and select Properties. Go to the Security page to enable SQL Server authentication. You need to restart SQL Server for the change to take effect.

    Was this answer helpful?

    0 comments No comments

  3. Olaf Helper 47,631 Reputation points
    2022-05-13T13:01:02.353+00:00

    The login is from an untrusted domain and cannot be used with Windows authentication.

    This logon error happens in a Windows Workgroup (= no domain) when you try to logon to a remote SQL Server using Windows Authentication; that don't work in a Workgroup, only in a AD.
    Use SQL Authentication instead.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.