2016-05-04 7 views
0

Mein Programm arbeitete auf Windows XP mit Windows Server 2003 und Framework 4.0 ohne Probleme. Wir verwenden Windows 7 auf Computern nicht mehr, wir erhalten einen Fehler über die Anmeldung, der jetzt fehlgeschlagen ist, wenn das Programm versucht, die Datenbank zu verbinden. Sollte ich etwas auf dem Client oder Server ändern, könnten Sie mir helfen?SQL-Server-Einstellungen für die Verbindung über Windows 7

Fehlermeldung ist:

Login failed. the login is from an untrusted domain and cannot be used with windows authentication 

Bu iletişim kutusu yerine JIT hata ayıklamayı çağırma hakkında detaylı bilgi için bu iletinin sonuna bakın. 

************** Özel Durum Metni ************** System.Data.SqlClient.SqlException (0x80131904): Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. konum: System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) konum: System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) konum: System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) konum: System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) konum: System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) konum: System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) konum: System.Data.SqlClient.SqlConnection.Open() konum: stokKontrol.Form1.dbBaglan() C:\Users\Dell\Documents\Visual Studio 2015\Projects\stokKontrol\stokKontrol\Form1.cs içinde: satır 291 konum: stokKontrol.Form1.cariOtoDoldur() C:\Users\Dell\Documents\Visual Studio 2015\Projects\stokKontrol\stokKontrol\Form1.cs içinde: satır 44 konum: stokKontrol.Form1.Form1_Load(Object sender, EventArgs e) C:\Users\Dell\Documents\Visual Studio 2015\Projects\stokKontrol\stokKontrol\Form1.cs içinde: satır 1370 konum: System.Windows.Forms.Form.OnLoad(EventArgs e) konum: System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) konum: System.Windows.Forms.Control.CreateControl() konum: System.Windows.Forms.Control.WmShowWindow(Message& m) konum: System.Windows.Forms.Control.WndProc(Message& m) konum: System.Windows.Forms.Form.WndProc(Message& m) konum: System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ClientConnectionId:824f06ba-5b8e-455a-9ef8-e53dfe23608c Error Number:18452,State:1,Class:14 


************** Yüklü Derlemeler ************** mscorlib 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.34209 built by: FX452RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll 
---------------------------------------- stokKontrol 
    Derleme Sürümü: 1.0.0.0 
    Win32 Sürümü: 1.0.0.0 
    CodeBase: file://Gunes/d$/gunluk_rapor/addOns/bltBin/stokKontrol/stokKontrol/bin/Debug/stokKontrol.exe 
---------------------------------------- System.Windows.Forms 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.34251 built by: FX452RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll 
---------------------------------------- System.Drawing 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.34270 built by: FX452RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll 
---------------------------------------- System 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.34238 built by: FX452RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll 
---------------------------------------- System.Windows.Forms.resources 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.18408 built by: FX451RTMGREL 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_tr_b77a5c561934e089/System.Windows.Forms.resources.dll 
---------------------------------------- System.Configuration 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.34209 built by: FX452RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll 
---------------------------------------- System.Xml 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.34234 built by: FX452RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll 
---------------------------------------- System.Data 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.34209 built by: FX452RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll 
---------------------------------------- System.Transactions 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.34209 built by: FX452RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll 
---------------------------------------- System.EnterpriseServices 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.34209 built by: FX452RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll 
---------------------------------------- mscorlib.resources 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.18408 built by: FX451RTMGREL 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_tr_b77a5c561934e089/mscorlib.resources.dll 
---------------------------------------- System.Data.resources 
    Derleme Sürümü: 4.0.0.0 
    Win32 Sürümü: 4.0.30319.18408 built by: FX451RTMGREL 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.resources/v4.0_4.0.0.0_tr_b77a5c561934e089/System.Data.resources.dll 
---------------------------------------- 

************** JIT Hata Ayıklama ************** JIT hata ayıklamayı etkinleştirmek için, bu uygulamanın veya bilgisayarın (machine.config) .config dosyasında system.windows.forms bölümünde jitDebugging değeri ayarlanmış olmalıdır. Ayrıca uygulama hata ayıklama etkin durumdayken derlenmiş olmalıdır. 

Örneğin: 

<configuration> 
    <system.windows.forms jitDebugging="true" /> </configuration> 

JIT hata ayıklama etkinken, işlenmemiş özel durumlar bu iletişim kutusunda işlenmek yerine bilgisayarda kayıtlı JIT hata ayıklayıcısına gönderilir. 
+0

Geben Sie die Verbindungszeichenfolge an, die der Client für die Verbindung verwendet. Wenn das Programm läuft, unter welchem ​​Benutzerkonto läuft es? Ist es definitiv ein Domänenbenutzer? –

+0

Ich verwende diese Zeichenfolge für die Verbindung. conString = "Server = GNS; Datenbank = GNSdatabase; Benutzer-ID = Benutzer; Kennwort = 123456; Trusted_Connection = true" – Bulut

Antwort

0

Ich löste das Problem nach meiner Verbindungszeichenfolge

von conString = „Server = GNS ändern; Database = GNSdatabase; ID = user Benutzer, Passwort = 123456; Trusted_Connection = true“

zu conString = "Server = GNS; Database = GNSdatabase; Benutzer-ID = user, Kennwort = 123456"

Ich wusste nicht, Trusted_Connection wird nur für Windows-Authentifizierung verwendet. Wenn ich das lösche, hat das Programm klar funktioniert.

Verwandte Themen