2009-07-28 187 views
5

ロードバランサの背後にWCFサービスが展開されていますが、SOAPを使用するとうまくいきますが、REST URL経由でアクセスしようとすると、 。これは私がhttpsでそれに到達しようとREST URLですWCF REST:WebHostが要求の処理に失敗しました

:// devreporting.dev.sample.com/ReportingManagement.svc/getAddtionsByCategory ..

ロードバランサのVIPはhttps:// devreporting.dev .sample.comがあり、ファイアウォールの背後にあるサーバーは1台しかありません。dev01

これはホストヘッダーに問題があると思われますが、これを修正する方法がわかりません。どんなアイデアでも大歓迎です。

Message: WebHost failed to process a request. Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/12646224 
Exception: 

System.Web.HttpException: There was no channel actively listening at 'https://dev01.dev.sample.com:17005/ReportingManagement.svc/reporting/getAddtionsByCategory'. 
     This is often caused by an incorrect address URI. 
     Ensure that the address to which the message is sent matches an address on which a service is listening. ---> 
    System.ServiceModel.EndpointNotFoundException: There was no channel actively listening at 'https://dev01.dev.sample.com:17005/ReportingManagement.svc/reporting/getAddtionsByCategory'. 
      This is often caused by an incorrect address URI. 
      Ensure that the address to which the message is sent matches an address on which a service is listening. 
    at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)  
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() 
    --- End of inner exception stack trace ---  
    at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result) 
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) 
    Process Name: w3wp Process ID: 4760 
+0

を働いたあなたは、SOAPURIおよび残りのURIの違いが何であるかを説明してくださいすることができます1つはHttpに、もう1つはHttpsにあるということですか? – hussian

答えて

11

ふう...私は私のセクションでセキュリティ設定がありませんでした、私はそれを追加したとき、物事は魔法のように

<webHttpBinding> 
    <binding name="CommerceRESTBinding"> 
     <security mode="Transport"> 
       <transport clientCredentialType = "None" proxyCredentialType="None"/> 
     </security> 

</binding> 
    </webHttpBinding> 
+0

これはどこに行くのですか? web.configから完全なスニペットを投稿できますか? –

+0

ありがとうございました - あなたはその日を救った! –

+0

ありがとうあなたは私に多くの時間を救いました – coderman

0

「チャンネルがアクティブではありません」というメッセージは、そのように聞こえます。リクエストが行われた時点でポート17005を聞くことはありませんでした。

正しいURLであることを確認してください。サーバー・マシン上でコマンドプロンプトウィンドウから次のコマンドを発行して、それをテストします。

telnet localhost 17005
GET /を入力してください。注意:これは、この場合

を入力し
をエコーし​​ません(IISから何かを接続して戻す)し、ロードバランサの遠い側のクライアントマシンから同じテストを実行します。もちろん、この場合は、localhostの代わりに完全なホスト名を使用してください。

0
<system.serviceModel> 
    <bindings> 
     <webHttpBinding> 
     <binding name="TransportSecurity"> 
      <security mode="Transport"> 
      <transport clientCredentialType="None"/> 
      </security> 
     </binding> 
     </webHttpBinding> 
    </bindings> 
    <services> 
     <service name="Service" behaviorConfiguration="ServiceBehaviour"> 
     <endpoint address="" binding="webHttpBinding" behaviorConfiguration="webMyAcc" bindingConfiguration="TransportSecurity" contract="IService"/> 
     <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="ServiceBehaviour"> 
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> 
      <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 
     </serviceBehaviors> 
     <endpointBehaviors> 
     <behavior name="webMyAcc"> 
      <webHttp /> 
     </behavior> 
     </endpointBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    <client />`enter code here` 
    </system.serviceModel>