2009-03-04 7 views
0

私は非常に単純なWCFサービス(IISでホストされています)とそれに対話するWebアプリケーションを作成しました。両方が同じドメインにある場合は正常に動作します。しかし、私は別のドメイン(ファイアウォールの異なる側)に置くと、Webアプリケーションは言う:WCFとファイアウォール

認証が失敗したため、セキュリティトークンの要求を満たすことができませんでした。説明:現在のWeb要求の実行中に未処理の例外が発生しました。エラーの詳細とコード内のどこで発生したのかについては、スタックトレースを参照してください。 例外の詳細:System.ServiceModel.FaultException:認証が失敗したため、セキュリティトークンの要求を満たすことができませんでした。 ソースエラー: 現在のWeb要求の実行中に、未処理の例外が生成されました。以下の例外スタックトレースを使用して、例外の起点および場所に関する情報を識別できます。サービスの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への応答を参照してください。 サービスのWebアプリケーションに対してセキュリティがどのように設定されていますか?

1

クロスドメインの状況では、ユーザーの資格情報が通常は異なるWindows認証を使用したいと思われます。 ファイアウォールの問題ではないようです。

デフォルトのWindows認証を解決するには、証明書を使用するか、何も使用しないでください。

関連する問題