[Mono-bugs] [Bug 567949] New: Self hosted service using NetTCPBinding hangs after second call

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jan 4 04:21:47 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=567949

http://bugzilla.novell.com/show_bug.cgi?id=567949#c0


           Summary: Self hosted service using NetTCPBinding hangs after
                    second call
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: 32bit
        OS/Version: openSUSE 11.0
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: WCF
        AssignedTo: atsushi at ximian.com
        ReportedBy: marcus.monaghan at wins.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development
           Blocker: Yes


When using NetTcpBinding in a self hosted application the client hangs after
the first call to a service.

I'm using OpenSuse 11.0 with Mono 2.6.1 (Stable - updated from Zypper)

On the second run of the client application it hangs. This is after a complete
restart of the client which suggests it's something to do with the server
(mono).

I've tested this on the following and I get the same results:

Windows (MS .NET 3.5) -> Suse 11
Windows (Mono) -> Windows (Mono)
OSX - Snow Leopard -> OSX - Snow Leopard

When I run the code using Windows (MS .NET 3.5) -> Windows (MS .NET 3.5) it
works fine.

It also works if I change the binding to BasicHttpBinding (which I've done for
now to continue the development).

Here is the code I used:

[ServiceContract]
public interface IPing
{
   [OperationContract]
   string Ping(string hostname);
}

[ServiceBehavior]
public class PingService : IPing
{
   public string Ping(string hostname)
   {
      Console.WriteLine("Received ping request from " + hostname);
      return "Pinged, " + hostname;
   }
}

/* SERVER Main */
static void Main(string[] args)
{
   ServiceHost serviceHost = new ServiceHost(typeof(PingService));
   serviceHost.AddServiceEndpoint(typeof(IPing),
      new NetTcpBinding(SecurityMode.None, false),
      "net.tcp://127.0.0.1:8000");
   serviceHost.Open();

   Console.WriteLine("SERVER - Waiting");
   Console.ReadLine();

   serviceHost.Close();
   Console.WriteLine("SERVER - Closed");
}

/* CLIENT */
ChannelFactory<IPing> serviceChannelFactory = new ChannelFactory<IPing>(
   new NetTcpBinding(SecurityMode.None, false), 
   "net.tcp://127.0.0.1:8000");

IPing pingService = serviceChannelFactory.CreateChannel();
pingService.Ping("Test");


Regards,
Marcus

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list