의 소비자가 내 WCF 서비스에 제 3 자 (통제)에 의해 발표 된 WCF 서비스 (서비스 및 A)를 소비 할 필요가 업그레이드되고있다. 내 웹 응용 프로그램 프로젝트 (vs2008)에 ServiceA을 사용하고 있으며 정상적으로 작동합니다.WCF 서비스 프로젝트에서 다른 WCF 서비스
내 WCF 프로젝트 (서비스 B)에 서비스 참조 추가로 시작했습니다. 서비스 이름이 "XYZ"라고 말할 수 있습니다. VS 필요한 모든 파일을 만들었지 만 컴파일하려고하면 오류가 발생했습니다.
'XYZ'형식이 'ServiceB.ServiceB'형식에 없습니다.
내 '서비스 B는'가 'ServiceB.SVC'나는 네임 스페이스를 제거하여이 문제를 극복하기 위해 노력
"ServiceB." Reference.cs 파일 및 그 내용. 이 코드는 컴파일 될 수 있습니다.
는 지금은
"호출자가 서비스에 의해 인증되지 않았습니다."라는 예외를 얻을
인증을 실패하여 보안 토큰에 대한 요청이 만족하지 않는
내부 예외입니다.
System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody (메시지 incomingMessage, SspiNegotiationTokenProviderState sspiState)=>
(AT System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault (메시지 메시지 EndpointAddress를 대상)에서
(System.ServiceModel.FaultException) (ex.InnerException)) 메시지 인증에 실패 했으므로 보안 토큰 요청을 만족시킬 수 없습니다.
은 다음 ServiceB에 의 Web.config 파일이 같이
<wsHttpBinding>
<binding name="WSHttpBinding_IABCService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://aaaaa/ ServiceA.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IABCService"
contract="XYZ.IABCService" name="WSHttpBinding_IABCService">
<identity>
<servicePrincipalName value="host/[hostname]" />
</identity>
</endpoint>
</client>
======
내가 내 자신을 만들어그 문제는 WCF는 WCF 접근에있을 수 있습니다 생각 . 웹 서비스 (.asmx)를 만들고 ServiceA에 대한 참조를 추가했습니다. 메소드를 호출하여 디버깅 할 때 ServiceA에서 결과를 얻습니다. 이것이 WCF와 WCF 문제 사이에서 파악할 때까지 사용할 수있는 해결책이었습니다. 저는 asmx 서비스에 대한 참조를 My WCF Service (ServiceB)에 추가했습니다. ServiceB 실행 -> asmx -> 서비스 A로 디버깅 할 때 사용자 오류로 인해 인증이 다시 실패합니다 !!!
나는 그것이 신원이 도용되고 함께 할 수있는 뭔가가 생각
... 난 ServiceB의 web.config는 ASMX web.config를 통해 우선 순위를 가지고 있음을 읽을 수 있지만 나는 해결책을 얻을 수 없습니다.
"보안 모드 = 없음"을 해제 할 수 없으므로 서비스 A는 토큰이 전달되지 않았다는 응답을 표시합니다.
어떤 도움을 받으실 수 있습니다 : WebApp 및 asmx에서 WC 서비스 A를 사용할 수 있지만 다른 WCF에서는 직접 또는 간접적으로 사용할 수 없습니다.
당신에게월
이 링크를 확인해 보겠습니다. – TheMar
http://stackoverflow.com/questions/9584198/authentication-service-using-wcf에 응답 해주십시오. – Lijo