2010-05-27 3 views
4

웹 응용 프로그램이 있으며 응용 프로그램 풀에서 'NETWORK SERVICE'로 실행됩니다. 웹 응용 프로그램이 다른 웹 서버의 서비스 (.svc)에 연결됩니다. 다른 웹 서버는 'NETWORK SERVICE'로 호스팅 된 서비스를 가지고 있습니다. 나는 이것이 디폴트라고 생각한다.예상되는 신원은 네트워크 서비스로 서비스에 연결 중입니다.

다음 엔드 포인트는 다른 곳에서 실행될 때 완벽하게 작동합니다.

<endpoint address="http://server123/UnitTrustService/UnitTrustService.svc" 
    binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_UnitTrustService" 
    contract="UnitTrustServiceReference.UnitTrustService" name="WSHttpBinding_UnitTrustService"> 
<identity> 
    <servicePrincipalName value="server123" /> 
</identity> 
</endpoint> 

불행히도 웹 사이트에서 실행하면 다음 오류가 발생합니다.

 System.ServiceModel.Security.MessageSecurityException: 
    The identity check failed for the outgoing message. 
    The expected identity is 'identity(http://schemas.xmlsoap.org/ws/2005/05/identity/right/possessproperty: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn)' 
for the 'http://server123/UnitTrustService/UnitTrustService.svc' target endpoint. 
Server stack trace: at System.ServiceModel.Security.IdentityVerifier.EnsureIdentity(EndpointAddress serviceReference, AuthorizationContext authorizationContext, String errorString)... 

아이디어가 있으십니까? 정확히 동일한 구성으로 웹 서버 컴퓨터에서 로컬 시스템으로 실행 해 보았습니다. 완벽하게 작동합니다.

IIS와 관련이 있습니까?

감사합니다. 크레이그.

답변

4

이것은 클라이언트의 web.config에 문제가 있음을 나타냅니다. 클라이언트의 경우 <identity>을 다시 확인하십시오. 예를 들어 클라이언트의 web.config에있는 다음 예제 스 니펫은 servicePrincipalName 대신 userPrincipalName이라는 ID가 서비스에 필요한 것으로 예상되는 경우이 예외가 발생할 수 있습니다. 이전에 나를 붙잡아 놓은 것은 쉽게 구별 할 수 있습니다.

<system.serviceModel> 
    <client> 
     <endpoint address="http://server.domain.com/Services/DoSomething.svc" behaviorConfiguration="EndpointBehavior" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IDoSomething" contract="Mycontract" name="WSHttpBinding_IDoSomething_Custom_AddSomething"> 
     <identity> 
      <servicePrincipalName value="[email protected]" /> 
+0

예, 응답을 보니 예상되는 UPN입니다. 이것이 UserPrincipalName입니다. servicePrincipalName을 userPrincipalName으로 변경하십시오. 시도 할 수있는 또 다른 방법은 server.domain.com을 IP 주소로 변경하고 이것이 NTLM을 강제하는지 확인하는 것입니다 – Sentinel