[Mono-dev] WCP and ServiceHost
Ásgeir Halldórsson
Asgeir.Halldorsson at dempseyclark.is
Tue Feb 23 12:15:25 EST 2010
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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100223/5a0c12a8/attachment-0001.html
More information about the Mono-devel-list
mailing list