2011-02-08 5 views
1

WCF를 사용하여 다른 서버에서 WCF 서비스를 호출하면 다음 오류가 발생합니다. HTTP 채널을 통해 데이터를 송신하는 동안WCF AllowNTLM .net 3.5sp1 및 IIS7.5

오류 (요청이 취소 된) 가 발생했습니다.

다음 서비스 .net3에 IIS7 상자에 근무하지만, 우리는 최근에 나는 AllowNtlm이 구성에서 속성을 제거하는 경우, 호출이 더 얻을 수 있지만, 수행, IIS7.5 및 .NET의 3.5sp1으로 업그레이드 전달하지 않는 서비스가 데이터베이스에 이중 홉을 할 수 있도록, 나는 다음 오류가 발생합니다.

'NT AUTHORITY \ ANONYMOUS LOGON'.

내가 IIS7을 사용하여 작업 한 클라이언트의 app.config의 사본을 동봉하지만

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 

    <system.serviceModel> 
    <behaviors> 
     <endpointBehaviors> 
     <behavior name="Windows"> 
      <clientCredentials> 
      <windows allowNtlm="false" allowedImpersonationLevel="Delegation"/> 
      </clientCredentials> 
      <dataContractSerializer maxItemsInObjectGraph="4194304"></dataContractSerializer> 
     </behavior> 
     </endpointBehaviors> 
    </behaviors> 
    <bindings> 
     <basicHttpBinding> 
     <binding allowCookies="false" bypassProxyOnLocal="false" closeTimeout="00:01:00" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="4194304" maxReceivedMessageSize="4194304" messageEncoding="Text" name="BasicHttpBinding_CalculationWebService" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:10:00" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> 
      <readerQuotas maxArrayLength="16384" maxBytesPerRead="4096" maxDepth="32" maxNameTableCharCount="16384" maxStringContentLength="8192"></readerQuotas> 
      <security mode="TransportCredentialOnly"> 
      <message algorithmSuite="Default" clientCredentialType="UserName"></message> 
      <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""></transport> 
      </security> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="http://server1.domain/WebServices/CacheManagement/CacheBusinessService.svc" behaviorConfiguration="Windows" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_CacheWebService" contract="CacheWCFService.CacheWebService" name="BasicHttpBinding_CacheWebService"> 
     <identity> 
      <servicePrincipalName value="http/server1.domain"></servicePrincipalName> 
     </identity> 
     </endpoint> 
    </client> 
    </system.serviceModel> 
</configuration> 

이것은 서버 구성, 어떤 아이디어?

<?xml version="1.0"?> 
<configuration> 
    <system.serviceModel> 
    <services> 
     <service behaviorConfiguration="CacheManagementBehavior" name="Iris.WebServices.CacheManagement.CacheWebService"> 
     <endpoint address="" behaviorConfiguration="" binding="basicHttpBinding" 
     bindingConfiguration="basicHttpBinding_CacheManagement" contract="Iris.WebServices.CacheManagement.CacheWebService" /> 
     <endpoint address="mex" behaviorConfiguration="" binding="basicHttpBinding" 
     bindingConfiguration="basicHttpBinding_CacheManagement" contract="IMetadataExchange" /> 
     </service> 
    </services> 
    <bindings> 
     <basicHttpBinding> 
     <binding name="basicHttpBinding_CacheManagement" maxReceivedMessageSize="4194304" receiveTimeout="00:30:00"> 
      <security mode="TransportCredentialOnly"> 
      <transport clientCredentialType="Windows"/> 
      <message clientCredentialType="UserName"/> 
      </security> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="CacheManagementBehavior"> 
      <dataContractSerializer maxItemsInObjectGraph="4194304" ignoreExtensionDataObject="True"/> 
      <serviceMetadata httpGetEnabled="True"/> 
      <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"/> 
      <serviceAuthorization impersonateCallerForAllOperations="true"/> 
     </behavior>a 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 
</configuration> 

답변

1

우리는 설정

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 

    <system.serviceModel> 
    <behaviors> 
     <endpointBehaviors> 
     <behavior name="Windows"> 
      <clientCredentials> 
      <windows allowNtlm="false" allowedImpersonationLevel="Delegation"/> 
      </clientCredentials> 
      <dataContractSerializer maxItemsInObjectGraph="4194304"></dataContractSerializer> 
     </behavior> 
     </endpointBehaviors> 
    </behaviors> 
    <bindings> 
     <basicHttpBinding> 
     <binding allowCookies="false" bypassProxyOnLocal="false" closeTimeout="00:01:00" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="4194304" maxReceivedMessageSize="4194304" messageEncoding="Text" name="BasicHttpBinding_CalculationWebService" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:10:00" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> 
      <readerQuotas maxArrayLength="16384" maxBytesPerRead="4096" maxDepth="32" maxNameTableCharCount="16384" maxStringContentLength="8192"></readerQuotas> 
      <security mode="TransportCredentialOnly"> 
      <message algorithmSuite="Default" clientCredentialType="UserName"></message> 
      <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""></transport> 
      </security> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="http://server1.domain/WebServices/CacheManagement/CacheBusinessService.svc" behaviorConfiguration="Windows" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_CacheWebService" contract="CacheWCFService.CacheWebService" name="BasicHttpBinding_CacheWebService" /> 
    </client> 
    </system.serviceModel> 
</configuration> 
에서 ServicePrincipleName을 제거하여 문제를 해결하기 위해 관리
관련 문제