2009-03-04 6 views
0

나는 아주 간단한 WCF 서비스 (IIS에서 호스팅 됨)와 웹 응용 프로그램을 작성했습니다. 둘 다 동일한 도메인에 있으면 잘 작동합니다. 그러나 다른 도메인 (방화벽의 다른 측면)에 넣으면 웹 응용 프로그램에 다음과 같이 표시됩니다.WCF 및 방화벽

인증에 실패 했으므로 보안 토큰 요청을 만족시킬 수 없습니다. 설명 : 현재 웹 요청을 실행하는 동안 처리되지 않은 예외가 발생했습니다. 오류 및 코드에서 시작된 위치에 대한 자세한 정보는 스택 추적을 검토하십시오. 예외 정보 : System.ServiceModel.FaultException : 인증에 실패 했으므로 보안 토큰 요청을 만족시킬 수 없습니다. 원본 오류 : 현재 웹 요청을 실행하는 동안 처리되지 않은 예외가 생성되었습니다. 예외의 출처와 위치에 관한 정보는 아래의 예외 스택 추적을 사용하여 식별 할 수 있습니다.

서비스의 Web.config의 revelant 부분은 다음과 같습니다

<system.serviceModel> 
<services> 
    <service behaviorConfiguration="MigrationHelperBehavior" 
    name="MigrationHelper"> 
    <endpoint address="" binding="wsHttpBinding" contract="IMigrationHelper"> 
     <identity> 
     <dns value="localhost" /> 
     </identity> 
    </endpoint> 
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />  <endpoint binding="httpBinding" contract="IMigrationHelper" />  </service> 
</services> 
<behaviors> 
    <serviceBehaviors> 
    <behavior name="MigrationHelperBehavior"> 
     <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> 
     <serviceMetadata httpGetEnabled="true"/> 
     <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
     <serviceDebug includeExceptionDetailInFaults="false"/> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
</system.serviceModel> 

웹 appliation (클라이언트)의 web.config는 말한다 :

나는 둘 생각
<system.serviceModel> 
<bindings> 
<wsHttpBinding> 
<binding name="WSHttpBinding_IMigrationHelper" 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://mydomain.com/MigrationHelper.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMigrationHelper" contract="MyNewServiceReference.IMigrationHelper" name="WSHttpBinding_IMigrationHelper"> 
<identity> 
    <dns value="localhost"/> 
</identity> 
</endpoint> 
</client> 
</system.serviceModel> 

이 그냥 기본입니다 그 VS 2008 나를 위해 만들어졌습니다.

그럼 내 질문은 서비스와 클라이언트가 동일한 도메인에 있지 않을 때 어떻게 구성합니까?

감사 .Jim Biddison는

답변

0

은 WCF 추적을 설정하는 방법에 대한 my question에 대한 응답을 참조하십시오. 서비스의 웹 응용 프로그램에 보안이 어떻게 구성되어 있습니까?

1

크로스 도메인 상황에서 사용자 자격 증명이 일반적으로 다른 Windows 인증을 사용하고 싶습니다. 방화벽 문제가 아닌 것 같습니다.

기본 Windows 인증을 해결하려면 인증서를 사용하거나 아무것도 사용하지 마십시오.