2017-11-02 5 views
0

Ich arbeite jetzt mit der MVC5-Anwendung über .net Framework 4.6.1 und ich verwende Windows-Container. Eine der Anforderungen besteht darin, ein Andockfenster für die Anwendung zu erstellen. Ich habe microsoft/aspnet:4.6.2 Bild erfolgreich gezogen und eine Webanwendung im Container bereitgestellt. In Dockerfile Ich habe "EXPOSE 1433" hinzugefügt, um sicherzustellen, dass SQL Server über diesen Port auf Host zugreifen kann. Das Problem ist mit SQL-Verbindung. Established Verbindung führt zu folgenden Fehlern:Wie kann ich über den Andockcontainer auf SQL Server zugreifen?

System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' 

soll ich, dass Verbindungszeichenfolge erwähnen ist mit aktivierter Integration Sicherheit. Ich habe versucht, die Anwendungspoolidentität zu setzen:

Set-ItemProperty IIS:\AppPools\DefaultAppPool\ -Name processModel -Value @{username='domain\user';password='somepassword';identityType=3 } 

Dies führt leider zu „HTTP-Fehler 503. Der Dienst ist nicht verfügbar“, weil der gestoppten Anwendungspools. Ich habe das Fenster Ereignisspeicher überprüft, wo ich drei Veranstaltungen gefunden haben:

Application pool DefaultAppPool has been disabled. Windows Process Activation Service (WAS) encountered a failure when it started a worker process to serve the application pool.

Application pool DefaultAppPool has been disabled. Windows Process Activation Service (WAS) did not create a worker process to serve the application pool because the application pool identity is invalid.

The identity of application pool DefaultAppPool is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives its first request. If batch logon rights are causing the problem, the identity in the IIS configuration store must be changed after rights have been granted before Windows Process Activation Service (WAS) can retry the logon. If the identity remains invalid after the first request for the application pool is processed, the application pool will be disabled. The data field contains the error number

Ich habe überprüft Berechtigungsnachweise, sie korrekt sind. Meine Gedanken sind, dass Container eine eigene private Domain hat. Deshalb kann ich keine Verbindung zu SqlServer herstellen. Forschen Ich habe this article gefunden.

Hat jemand versucht, das Active Directory im Andock-Container zu konfigurieren? Wie lösen Sie das Problem mit SQL-Verbindung?

Antwort

Verwandte Themen