Windows 2008의 서버가있는 IIS 5.0에서 실행되는 WCF 클라이언트의 오류

StackOverflow https://stackoverflow.com/questions/897718

  •  23-08-2019
  •  | 
  •  

문제

Windows 2008 시스템에서 IIS 7에서 실행되는 .NET 3.5 SP1 WCF 서비스가 있습니다. IIS 5.0 (Windows XP) .NET 3.5 SP1에서 실행되는 IIS 호스팅 WCF 서비스 에서이 서비스에 연결하려고하면 다음 오류가 발생합니다.

토큰 제공 업체는 대상에 대한 토큰을 얻을 수 없습니다. http : // (url WCF 서비스 용)

정확히 동일한 구성을 사용하여 WCF 서비스에 성공적으로 연결할 수있는 간단한 콘솔 애플리케이션을 구축했습니다. 또한 WebDev 서버 (Visual Studio 2008과 함께 제공되는 ASP.NET 서버)에서 호스팅되는 간단한 웹 응용 프로그램을 구축했으며 WCF 서비스에 성공적으로 연결할 수 있습니다. IIS (Windows XP) 내의 가상 디렉토리를 WebDev 서버와 동일한 디렉토리를 가리키면 다음 오류가 발생합니다.

보안 패키지에는 자격 증명이 없습니다

그러나 Web.config를 설정하여 로그온 자격 증명을 사용하여 가장하는 사람을 설정하면 제대로 작동합니다. 이것은 명백한 이유로 좋은 장기 솔루션이 아닙니다. IIS와 WebDev 서버간에 내가 언급 한 한 가지 차이점은 각 프로세스가 실행중인 사용자입니다. IIS는 ASPNET 계정에 따라 실행되며 WebDev는 내 계정에서 실행됩니다.

클라이언트의 WCF 섹션에 대한 구성은 다음과 같습니다.

<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="mexBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
      <serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="200" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<bindings>
  <wsHttpBinding>
    <binding name="FABindings" maxReceivedMessageSize="2147483647">
      <readerQuotas maxStringContentLength="300000"/>
      <security mode="Message">
        <message clientCredentialType="Windows" negotiateServiceCredential="false" establishSecurityContext="false" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
<client>
  <endpoint address="http://<server url>/FinancialAggregator/v3/Services/FAService.svc"
      binding="wsHttpBinding" bindingConfiguration="FABindings"
      contract="ServiceReference1.IFilteredService" name="FAServiceEndpoint">
    <identity>
      <servicePrincipalName value="<UsernameRunningTheAppPoolOnW2k8>" />
    </identity>
  </endpoint>
</client>  

다음은 서버 구성입니다 (요청 된대로).

  <system.serviceModel>
<bindings>
  <wsHttpBinding>
    <binding name="wsHttpBinding" maxReceivedMessageSize="2147483647">
      <security mode="Message">
        <message establishSecurityContext="false" negotiateServiceCredential="false" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="mexBehavior">
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
      <serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="200" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service behaviorConfiguration="mexBehavior" name="FCSAmerica.Financial.Aggregator.Service.FilteredService">
    <endpoint name="FAServiceEndpoint" address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding" contract="FCSAmerica.Financial.Aggregator.Service.IFilteredService">
    </endpoint>
  </service>
</services>

이 오류의 원인에 대한 생각이 있습니까?

감사!

도움이 되었습니까?

해결책 2

이 질문에 대한 궁극적 인 대답은 OS로 단순히 업그레이드하여 세석 전에 해왔 던 애플리케이션 풀의 신원을 설정할 수있는 것입니다.

고려해 주셔서 감사합니다.

매트

다른 팁

IIS를 통해 서비스에 액세스 할 때, = false = false는 Windows 2008 시스템의 서비스에 액세스하는 데 사용되는 ASPNET 계정입니다.

ASPNET 계정은 로컬 계정이므로 2008 기계에 대한 권리가 없습니다.

이것을 해결할 수있는 3 가지 방법이 있습니다.

  • Windows 2008 시스템의 서비스에 대한 익명 액세스 허용
  • 최저치를 사용하십시오 = 참 (당신이 가진대로)
  • 애플리케이션 풀의 ID를 ASPNET에서 필요한 액세스로 도메인 계정으로 변경하십시오.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top