none
Problem with WCF Client timing out RRS feed

  • Question

  • I'm having problems with a WCF client timing out, and I cannot find why. This is the TEST code I'm using (this is not the real code, just a sample that shows that the WCF is timing out for not apparent reason):

                Dim anAnalysisDelay As Integer = ScourmanService.GetAnalysisDelay
                Dim aReporthPath As String = ScourmanService.GetHTMLReportPath
                Dim anAnalysisPluginID As Integer = ScourmanService.GetAnalysisPlugInID
                DirWatchGenSettingsChanged(anAnalysisDelay, aReporthPath, anAnalysisPluginID)
                anAnalysisPluginID = ScourmanService.GetAnalysisPlugInID

    as you can see, I call ScourmanService.GetAnalysisPlugInID twice, once before calling DirWatchGenSettingsChanged and once after. It times out the second call. Can anyone think of a reason why this is happening?

    Thanks in advance,

    Marco

    here's the code for DirWatchGenSettingsChange, in case you want to see it. it does nothing related to the WCF service (other than implement a callback interface that is not used by the service at this stage), and it does not produce any exceptions:

        Public Sub DirWatchGenSettingsChanged(ByVal AnalysisDelay As Integer, ByVal HTMLReportPath As String, PlugInForAnalysis As Integer) _
            Implements ScourmanService.IScourmanServiceCallback.DirWatchGenSettingsChanged
    
            'updates controls showing settings
            nudDelay.Value = AnalysisDelay
            tbHTMLReportPath.Text = HTMLReportPath
    
            ''finds and select appropriate index in dropdown box
            Dim CurrentPlugInID As Integer = PlugInForAnalysis
            Dim anItemString, anItemID As String
            If CurrentPlugInID <> -1 Then
                For Each item In cbAnalysisPlugin.Items
                    anItemString = item.ToString
                    anItemID = anItemString.Substring(0, anItemString.IndexOf(":"))
                    If Convert.ToInt32(anItemID) = CurrentPlugInID Then
                        cbAnalysisPlugin.SelectedItem = item
                        Exit For
                    End If
                Next
            End If
        End Sub


    Monday, September 21, 2015 10:13 AM

Answers

  • Hi Marco A Garcia,

    In my opinion, you need  to close the proxy client after each call.

    For example:

    MyTestClient client = new MyTestClient()
    
    client.GetResultFromService()
    
    client.close();
    

    Best Regards,

    Grady

    Tuesday, September 22, 2015 2:07 AM
    Moderator

All replies

  • You doing any checking on a blocking satiation? The client is setting there waiting and times out?
    Monday, September 21, 2015 8:16 PM
  • Hi Marco A Garcia,

    In my opinion, you need  to close the proxy client after each call.

    For example:

    MyTestClient client = new MyTestClient()
    
    client.GetResultFromService()
    
    client.close();
    

    Best Regards,

    Grady

    Tuesday, September 22, 2015 2:07 AM
    Moderator