[Mono-dev] WCP and ServiceHost

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Tue Feb 23 19:06:24 EST 2010


Hello,

As mentioned on [*1] you won't get NetTcpBinding working unless you are 
using trunk.
Besides, 1) you use reliable session which is not implemented, and 2) 
those timeouts seem too short and I don't think they result in good 
connection.
Basically NetTcpBinding is not very stable and it won't be suitable for 
those who cannot dig into its internals.

[*1] 
http://veritas-vos-liberabit.com/monogatari/2009/12/mono-wcf-advent-day-11-nettcpbinding.html

Atsushi Eno

On 2010/02/24 2:15, Ásgeir Halldórsson wrote:
>
> Hello,
>
>                 I have a strange problem with WCF and ServiceHost is 
> seams my server is not listening sometimes (like 50/50).  Has anyone 
> had the same problem,  Also my client hangs on trying to connect and 
> does not throw and error after 5 sec like the config tells it to.  Any 
> comments?
>
> CODE Server:
>
> Uri uri = new Uri(ConfigurationManager.AppSettings["addr"]);
>
> host = new ServiceHost(typeof(GlobalService), uri);
>
> host.Open(); //Returns always
>
> Config Server:
>
> <appSettings>
>
> <add key="addr" value="net.tcp://<private>:22222/globalservice" />
>
> </appSettings>
>
> <system.serviceModel>
>
> <services>
>
> <service name="com.PageFlipper.GlobalServer.GlobalService" 
> behaviorConfiguration="GlobalServer.GlobalServiceBehavior">
>
> <endpoint address=""
>
> binding="netTcpBinding"
>
> bindingConfiguration="DuplexBinding"
>
> contract="GlobalServer.IGlobalService">
>
> </endpoint>
>
> </service>
>
> </services>
>
> <behaviors>
>
> <serviceBehaviors>
>
> <behavior name="GlobalServer.GlobalServiceBehavior">
>
> <serviceThrottling maxConcurrentSessions="10000" />
>
> </behavior>
>
> </serviceBehaviors>
>
> </behaviors>
>
> <bindings>
>
> <netTcpBinding>
>
> <binding name="DuplexBinding" openTimeout="00:00:05" 
> closeTimeout="00:00:05" receiveTimeout="00:10:00" sendTimeout="00:00:05">
>
> <reliableSession enabled="true" />
>
> <security mode="None" />
>
> </binding>
>
> </netTcpBinding>
>
> </bindings>
>
> </system.serviceModel>
>
> Clinet CODE:
>
> var client = new Proxy.GlobalServiceClient();
>
> client.Open(); // Hangs like 50/50 of the time
>
> Client config
>
> <system.serviceModel>
>
> <client>
>
> <endpoint address="net.tcp://<private>:22222/globalservice"
>
> binding="netTcpBinding" 
> bindingConfiguration="DefaultBinding_IGlobalService"
>
> contract="Proxy.IGlobalService" 
> name="DefaultBinding_IGlobalService_IGlobalService" />
>
> </client>
>
> <bindings>
>
> <netTcpBinding>
>
> <binding name="DefaultBinding_IGlobalService" openTimeout="00:00:05" 
> closeTimeout="00:00:05" receiveTimeout="00:10:00" 
> sendTimeout="00:00:05" >
>
> <reliableSession enabled="true" />
>
> <security mode="None" />
>
> </binding>
>
> </netTcpBinding>
>
> </bindings>
>
> </system.serviceModel>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>    



More information about the Mono-devel-list mailing list