Çözüldü SQL Server 2019 "Login failed. The login is from an untrusted domain" hatası

Bu konu çözüldü olarak işaretlenmiştir. Çözülmediğini düşünüyorsanız konuyu rapor edebilirsiniz.

Sinan Uğurlu

Kilopat
Katılım
30 Mayıs 2018
Mesajlar
496
Çözümler
12
Yer
Datacenter
Daha fazla  
Cinsiyet
Erkek
Meslek
Yazılım ve Ağ Altyapı Danış.
İyi günler, ASP.net MVC Core 6'da bir proje geliştiriyorum, projeyi ISS üzerinde denemek istedim ancak aşağıda detaylarını paylaşacağım hatayı aldım, Sıfırdan proje oluşturdum ancak yine aynı hata'yı aldım, Sorun ya Connection String'te yada SQL server yapılandırmasında. Hatayı çözmede yardımcı olabilir, Şöyle birşey denedim, SQL Server 'da IP adresi ve Windows Authentication ile giriş yaptığımda aynı hatayı alıyorum, ancak "sa" kullanıcı ile girdiğimde bağlanıyorum. Şimdiden teşekkürler.


C#:
Microsoft.Data.SqlClient.SqlException
  HResult=0x80131904
  Message=Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.
  Source=Core Microsoft SqlClient Data Provider
  StackTrace:
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool)
   at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry, SqlConnectionOverrides overrides)
   at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides)
   at WebApplication1.Controllers.HomeController.Index() in D:\Projeler\WebApplication1\WebApplication1\Controllers\HomeController.cs:line 22
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()

Hata Aldığım Connection String:
ASP.net:
        SqlConnection SqlBaglanti = new SqlConnection("Server=192.168.1.40;Database=CoreDashboard;Trusted_Connection=True;TrustServerCertificate=True;MultipleActiveResultSets=True");

Çalışan Connection String:
ASP.net:
        SqlConnection SqlBaglanti = new SqlConnection("Server=SINANUGURLU\\SQLEXPRESS;Database=CoreDashboard;Trusted_Connection=True;TrustServerCertificate=True;MultipleActiveResultSets=True");
 
Çözüm
IP adresi olarak 127.0.0.1 dene muhtemelen bağlanacaksın.
Yorumunuz için teşekkür ederim, sorunu Core projemi Developer moduna alarak çözdüm, Connection String'te sorun yokmuş, SQL Server üzerinden IISUser kullanıcısını oluşturup yetki verdiğimde sorun çözüldü. Teşekkür Ederim yinede cevabınız için.
IP adresi olarak 127.0.0.1 dene muhtemelen bağlanacaksın.
Yorumunuz için teşekkür ederim, sorunu Core projemi Developer moduna alarak çözdüm, Connection String'te sorun yokmuş, SQL Server üzerinden IISUser kullanıcısını oluşturup yetki verdiğimde sorun çözüldü. Teşekkür Ederim yinede cevabınız için.
 
Çözüm

Yeni konular

Geri
Yukarı