2016-12-12 9 views
0

私は現在、C#との通信でwshttpdualbindingを使用しているクライアント/サーバプログラムで作業しています。だから私はサーバーからこのバインディングを介してwebservicesを呼び出しています。wsDualHttpBindingはサーバにリクエストを送信していません

すべてうまくいきましたが、最終日に私は次の問題に遭遇しています。サーバからサービスを呼び出すと、クライアントは動作を停止して反応を停止します。何もクライアントから送信されません。

それは大きなプロジェクトですので、私は、あまり投稿することはできませんが、私は最高のスニペット投稿してみましょう:

結合:

<bindings> 
    <basicHttpBinding> 
    <binding name="BasicHttpBinding_AuthenticationService" closeTimeout="03:10:00" 
     openTimeout="03:10:00" receiveTimeout="03:10:00" sendTimeout="03:10:00" 
     bypassProxyOnLocal="false" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" 
     useDefaultWebProxy="true" allowCookies="false" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" > 
     <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" 
     maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> 
     <security mode="None"> 
     <transport clientCredentialType="None" proxyCredentialType="None" 
      realm="" /> 
     <message clientCredentialType="UserName" algorithmSuite="Default" /> 
     </security> 
    </binding> 
    </basicHttpBinding> 
    <wsDualHttpBinding> 
    <binding name="WSDualHttpBinding_Service" closeTimeout="03:10:00" 
     openTimeout="03:10:00" receiveTimeout="03:10:00" sendTimeout="03:10:00" 
     bypassProxyOnLocal="false" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" 
     useDefaultWebProxy="true" messageEncoding="Text" textEncoding="utf-8" > 
     <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" 
     maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> 
     <security mode="None"> 
     <message clientCredentialType="UserName" algorithmSuite="Default"/> 
     </security> 
    </binding> 
    </wsDualHttpBinding> 
</bindings> 

問題原因コード:

Clusterrationalemapping cr = new Clusterrationalemapping 
{ 
    Textbricks = rationale, 
    Cluster = cluster, 
    Project = CurrentProject 
}; 
var clusterrationaleId = 0; 
if (cluster.AddClusterRationaleMapping(cr)) 
{         
    clusterrationaleId = _service.SaveItem(cr); 
    cr.Id = clusterrationaleId; 
    if(rationale.Clusterrationalemappings == null) rationale.Clusterrationalemappings = new List<Clusterrationalemapping>(); 
    rationale.Clusterrationalemappings.Add(cr); 
} 

特定のクラスターに対して新しいclusterrationalemappingを作成する関数が呼び出されます。 rationalCurrentProjectの変数は常に同じです。ちょうどクラスタは異なっています。 ほとんどすべての場合、service.SaveItemは期待どおりに新しいIDを返します。しかし、1つの特別なクラスタでは機能しません。 service.SaveItemは、私が何らかの例外が発生するまで(サーバは時間内に応答しなかった/応答しなかった)まで、ツールを停止してフリーズします。

私はwsDualHttpBindingが正しく設定されていると確信しています。もし私がProject = CurrentProjectという行をコメントアウトし、Project = new Project();と置き換えると、このクラスタではすべてがうまくいきます。

だから、clusterrationalmappingが送信するには大きすぎるようです。しかし、例外はそれを言っているわけではありません。そして私はそれをサーバから手に入れました。

デバッグ目的でMicrosoft Service Trace Viewerを使用しましたが、エンドポイントに到達できなかったという例外がすぐにスローされることがあります。だから私はかなりオブジェクトがシリアル化するときにサービスが死ぬことを確信しています。

サービスにデバッグして、いつ、それが失敗するのかを正確に、よりよく確認する方法はありますか?

ご協力いただきありがとうございます。

答えて

0

私は解決策を見つけることができなかったので、私はまだシリアライザと大きすぎる/ネストされたクラスに問題があったと思うので、nettcpへのバインディングを変更しました。

関連する問題