2011-07-14 22 views
1

共有ホスティングサーバーでWCFサービスにアクセスしようとしていますが、サービスを利用できますが、サービスを呼び出そうとすると「呼び出し元がサービスによって認証されていません」というエラーが発生します。共有プロバイダのホストWCFサービス

クライアントのapp.configを

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <system.serviceModel> 
     <bindings> 
      <wsDualHttpBinding> 
       <binding name="WSDualHttpBinding_TicketingService" clientBaseAddress="http://mmservice.somee.com:8001/MMService.Ticketing.svc" 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"> 
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
         maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
        <reliableSession ordered="true" inactivityTimeout="00:10:00" /> 
        <security mode="Message"> 
         <message clientCredentialType="IssuedToken" negotiateServiceCredential="true" 
          algorithmSuite="Default" /> 
        </security> 
       </binding> 
      </wsDualHttpBinding> 
     </bindings> 
     <client> 
      <endpoint address="http://mmservice.somee.com/MMService.Ticketing.svc" 
       binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_TicketingService" 
       contract="MMService.TicketingService" name="WSDualHttpBinding_TicketingService"> 
       <identity> 
        <servicePrincipalName value="host/vb5100" /> 
       </identity> 
      </endpoint> 
     </client> 
    </system.serviceModel> 
</configuration> 

サービスのapp.config

<?xml version="1.0"?> 
<configuration> 
    <system.web> 
    <compilation debug="true"/> 
    <customErrors mode="Off"/> 
    </system.web> 
    <system.serviceModel> 
    <client> 

    </client> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="True"/> 
    <services> 
     <service behaviorConfiguration="MMService.Service1Behavior" name="MMService.Ticketing"> 
     <host> 
      <baseAddresses> 
      <add baseAddress = "http://localhost:8732/Design_Time_Addresses/MMService/Service1/"/> 
      </baseAddresses> 
     </host> 
     <endpoint address ="" binding="wsDualHttpBinding" bindingConfiguration="" contract="MMService.ITicketService"> 

     </endpoint> 
     <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="MMService.Service1Behavior"> 
      <serviceMetadata httpGetEnabled="True"/> 
      <serviceDebug includeExceptionDetailInFaults="False" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 
</configuration> 

誰がこの問題を解決する方法を知っていますか?ありがとう。

+0

ほとんどの共有ホスティングサービスは、net.tcp(ファイアウォールの制限)をサポートしていません。 somee.comもそうではない可能性があります。このような場合は、HTTPベースのバインディングを使用するようにバインドを変更する必要があります。 – carlosfigueira

+0

OK wsDualHttpBindingに変更しました。サーバー上でサービスを表示することができますが、私はそれにアクセスできますが、私はそれにアクセスしようとすると、私は受信者がサービスエラーによって認証されていません。この新しい問題について質問を編集しました。 – Lost

+0

PS:クライアントとサービスが別々のネットワーク上にあるため、Windowsクレデンシャルが機能しないため、セキュリティモードを「なし」に変更しました。私もアイデンティティを削除し、今私はタイムアウトエラーを取得するか、またはエンドポイントがリスニングエラーであった。私は何を助けて傷つけたのか分かりませんが、論理的に思えます。 – Lost

答えて

0

共有プロバイダーのIISでホストされているWCFサービスで同じエラーが発生しました。明らかに、WCFは部分的に信頼できる発信者をサポートしていません。私の解決策は、WCFサービスのWeb設定ファイルのタグ内に信頼宣言を追加することでした。それ以降はすべてがうまくいった。

<configuration> 
    <system.web> 
    <trust level="full"/> 
    ... 
    </system.web> 
    ... 
</configuration> 
+0

私は今得ますこの操作はallotedタイムアウト期間内に完了しませんでした。 – Lost

関連する問題