2016-09-06 29 views
2

因此,我們有一個小應用程序指向2008 SSRS服務器上的報告。「目標主體名稱不正確」401錯誤

這個程序能正常工作正常,但由於我們增加了更多的網站服務器,我們已經改變了Web應用程序綁定到的東西,是不是服務器的名稱。

這使我們得到如下:

The target principal name is incorrect 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.ComponentModel.Win32Exception: The target principal name is incorrect

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:

[Win32Exception (0x80004005): The target principal name is incorrect] System.Net.NTAuthentication.GetOutgoingBlob(Byte[] incomingBlob, Boolean throwOnError, SecurityStatus& statusCode) +2622099
System.Net.NTAuthentication.GetOutgoingBlob(String incomingBlob) +99
System.Net.NegotiateClient.DoAuthenticate(String challenge, WebRequest webRequest, ICredentials credentials, Boolean preAuthenticate) +767
System.Net.NegotiateClient.Authenticate(String challenge, WebRequest webRequest, ICredentials credentials) +18
System.Net.AuthenticationManager.Authenticate(String challenge, WebRequest request, ICredentials credentials) +146
System.Net.AuthenticationState.AttemptAuthenticate(HttpWebRequest httpWebRequest, ICredentials authInfo) +2279623
System.Net.HttpWebRequest.CheckResubmitForAuth() +3031261
System.Net.HttpWebRequest.CheckResubmit(Exception& e) +169

[WebException: The remote server returned an error: (401) Unauthorized.]

我們增加了一個SPN爲新的綁定名字到SSRS服務器運行應用程序,但沒有任何標識。

我看到很多人誰擁有SSPI問題,這樣做的人,但沒有一個401錯誤。

,我們正在使用的ID已全面進入兩個框,如果你可以從Web服務器到SSRS沒有問題直接去。它只有當它包裝在應用程序中,我們得到一個錯誤。

有沒有人遇到過這個問題?

感謝

+0

任何運氣與我的答案。如果你能讓我知道你的發現會有所幫助。 –

回答

1

所以,我沒有找到答案,這是一個雙跳認證的問題。

你可以找到更好的描述在那裏,但基本上站點試圖兩次(一次到Web服務器,一旦到SQL服務器)進行身份驗證但是,Windows只會把你的用戶名和密碼的一次。之後,它只會通過ID。

解決的辦法是你需要有應用程序的應用程序池使用Kerberos的啓用ID,就像你,如果你使用了負載均衡需要。

+0

嗨,我有同樣的問題;你能詳細一點說明你是如何解決這個問題的嗎? – stt106

+0

回答這個很晚,但你需要一個啓用kerberos的Id(與你的管理員交談,他們應該知道如何創建一個)。然後在appPool中使用該ID。這項工作真的都在管理方面。 – Limey

2

所以我相信你的web應用有,而不是服務器名稱自定義主機名(請糾正我,如果我錯了這裏)。

您需要驗證的第一件事情是該主機名是A Record還是CName。您可以在主機名上執行ping操作,並參見

  1. 如果它首先解析爲服務器名稱,然後ip-CName。 你不會在這樣的情況下,需要新的SPN,你需要確保原始SPN(具有機器名)使用相同的標識應用程序池
  2. 如果直接解析到服務器IP,你需要一個SPN 你需要新的SPN,並且需要確保應用程序池標識和SPN標識相同。確保useAppPoolCredentials =真(IIS管理器 - > Web站點 - >配置編輯器 - > system.webServer /安全/認證/ windowsAuthentication)
相關問題