2010-12-18 21 views
1

IISにサービスを公開しようとしていますが、ASP.NET開発サーバーでOKをビルドして実行しています。 IISで実行しているときは、サービスに移動するか、Visual Studioでサービス参照を追加してメタデータにアクセスできます。しかし、クライアントアプリケーションからメソッドを呼び出すと、内部サーバーエラーでクラッシュします。だから私は、イベントログに行って、これを見つけた:メタデータを持つIISでWCFサービスエラーが発生しました

WebHost failed to process a request. 
Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/8810861 
Exception: System.Web.HttpException (0x80004005): There was no channel actively listening at 'http://mysite.net/soundhubservice.svc/$metadata'. 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 'http://mysite.net/soundhubservice.svc/$metadata'. 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() 
    at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) 
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) 
Process Name: w3wp 
Process ID: 1080 

私のWeb.Configは、次のようになります。常に、

<configuration> 
    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 
    <system.serviceModel> 
    <services> 
     <service name="SoundHub.Services.SoundHubService" behaviorConfiguration="StreamingServiceBehavior"> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost/SoundHubServive"/> 
      </baseAddresses> 
     </host> 
     <endpoint address="service" binding="basicHttpBinding" bindingConfiguration="httpBuffering" contract="SoundHub.Services.ISoundHubService"/> 
     <endpoint address="stream" binding="basicHttpBinding" bindingConfiguration="HttpStreaming" contract="SoundHub.Services.ISoundHubStreamService"/> 
     <!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />--> 
     </service> 
    </services> 

    <bindings> 
     <basicHttpBinding> 
     <binding name="HttpStreaming" maxReceivedMessageSize="67108864" transferMode="Streamed"/> 
     <binding name="httpBuffering" transferMode="Buffered" /> 
     </basicHttpBinding> 
    </bindings> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="StreamingServiceBehavior"> 
      <serviceMetadata httpGetEnabled="True"/> 
      <serviceDebug includeExceptionDetailInFaults="False"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 

    </system.serviceModel> 
<system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 

</configuration> 

は、オンラインで検索しながら、私が見つけたの設定のいくつかの組み合わせを試しましたが、何も助けません同じエラー。私は、返されたオブジェクトのいずれかが列挙を含んでいたとき、私はこの問題を抱え

おかげ ブルーノ

+0

同じエラーが発生するhttp://stackoverflow.com/questions/5778774/wcf-3-5-svc-service-webhost-failed-to-process-a-request –

答えて

0

。それをシリアル化する方法を理解できなかったことが分かります。

問題が解決しない場合は、列挙型(または文字列値)のint値を返し、クライアント側の列挙型に戻してみてください。

関連する問題