2011-07-26 15 views
5

自分自身のWCFサービスをホストするIIS 7.5を実行するサーバーと通信するSilverlight 4アプリケーションがあります。アプリケーションは99%の効率で動作しますが、ユーザーはアプリケーションがフリーズするか、アプリケーションのさまざまなポイントでエラーメッセージが生成されることを1日に数回報告します。SilverlightクライアントとWCFサービス間の断続的な通信の問題

私は、WCFのトレースをオンにし、次のエラーが発生します。

<Exception> 
    <ExceptionType>System.ServiceModel.ProtocolException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType> 
    <Message>The number of bytes available is inconsistent with the HTTP Content-Length header. There may have been a network error or the client may be sending invalid requests.  </Message> 
    <StackTrace> 
    at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream) 
    at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(Exception&amp; requestException) 
    at System.ServiceModel.Channels.HttpChannelListener.HttpContextReceived(HttpRequestContext context, Action callback) 
    at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result) 
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() 
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() 
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state) 
    at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) 
    at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped) 
    at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP) 
    </StackTrace> 
</Exception> 

私は、ユーザーのマシン上のバイオリン弾きを実行し、次のエラーが発生しましたが見つかりました:

HTTP/1.1 504 Fiddler - Receive Failure 
Content-Type: text/html; charset=UTF-8 
Connection: close 
Timestamp: 18:24:21.941 

ReadResponse() failed: The server did not return a response for this request. 

に見えるいくつかの研究から、クライアントとサーバーの間に通信の問題があるようです。サーバーは仮想プライベートサーバーであり、私は決して問題を抱えてはいません。また、ログを見ると、プロセッサ/メモリを賢明に使うことはできません。

質問: 1.何が起こっているのかを詳細に調べるために何かできることはありますか?このエラーを避けるために調整できるIISまたはサーバー関連のファイル 2. Silverlightアプリケーションには何らかの方法があります時間(例えば30秒)の特定の量を待っても応答が受け取っれていない場合は、現在の要求をキャンセルし、再び

+0

があれば、あなたがチェックしていますがあなたのサービスメソッドは例外をスローしますか? – Jehof

+0

Jehof - サービスメソッドは例外をスローしません。エラーの後で同じサービスメソッド呼び出しを行うことができ、それが動作します。 –

+0

サーバーのイベントログを確認しましたか? – Jehof

答えて