Discussion:
WCF how to set infinite inactivity timeout
(too old to reply)
Fritz Hilgemann
2010-10-06 10:52:18 UTC
Permalink
Hello,

I have a WCF service and client (duplex) where the client is mainly waiting
for events via the callback. Unfortunately, it suffers from timing out,
since it does not call a dummy function once in a while. So, I would like to
change the inactivity timeout to infinite.
All I found how to do this in the configuration file. BUT: I am
intentionally not using a config file. Instead, I code the service behaviour
directly.
tcpBinding.ReliableSession.InactivityTimeout =
The point is, it accepts a TimeSpan, but appearently, Timespan does not
support "infinite".
Any ideas how to accomplish this infinite behaviour programatically?

Regards,
Fritz
Steel
2010-10-06 13:27:37 UTC
Permalink
Post by Fritz Hilgemann
Hello,
I have a WCF service and client (duplex) where the client is mainly waiting
for events via the callback. Unfortunately, it suffers from timing out,
since it does not call a dummy function once in a while. So, I would like to
change the inactivity timeout to infinite.
All I found how to do this in the configuration file. BUT: I am
intentionally not using a config file. Instead, I code the service behaviour
directly.
tcpBinding.ReliableSession.InactivityTimeout =
The point is, it accepts a TimeSpan, but appearently, Timespan does not
support "infinite".
Any ideas how to accomplish this infinite behaviour programatically?
You may want to make a post at the forum below.

Msdn.en-US.wcf
Roman Wagner
2010-10-06 14:17:21 UTC
Permalink
Hello,

in ou project we use the following Binding and works perfectly.
<netTcpBinding>
<binding name="netTcpBinding"
receiveTimeout="Infinite">
<reliableSession inactivityTimeout="00:00:10"
enabled="true" />
</binding>
</netTcpBinding>

This is equal to the following code

binding.ReliableSession.Enabled = true;
binding.ReliableSession.InactivityTimeout =
TimeSpan.FromSeconds(10);
binding.ReceiveTimeout = TimeSpan.MaxValue;
ZA
2011-02-04 16:15:12 UTC
Permalink
where do you specify this binding? on the client side config file? thank you
Post by Fritz Hilgemann
Hello,
I have a WCF service and client (duplex) where the client is mainly waiting
for events via the callback. Unfortunately, it suffers from timing out,
since it does not call a dummy function once in a while. So, I would like to
change the inactivity timeout to infinite.
All I found how to do this in the configuration file. BUT: I am
intentionally not using a config file. Instead, I code the service behaviour
directly.
tcpBinding.ReliableSession.InactivityTimeout =
The point is, it accepts a TimeSpan, but appearently, Timespan does not
support "infinite".
Any ideas how to accomplish this infinite behaviour programatically?
Regards,
Fritz
Post by Steel
You may want to make a post at the forum below.
Msdn.en-US.wcf
Post by Fritz Hilgemann
Hello,
in ou project we use the following Binding and works perfectly.
<netTcpBinding>
<binding name="netTcpBinding"
receiveTimeout="Infinite">
<reliableSession inactivityTimeout="00:00:10"
enabled="true" />
</binding>
</netTcpBinding>
This is equal to the following code
binding.ReliableSession.Enabled = true;
binding.ReliableSession.InactivityTimeout =
TimeSpan.FromSeconds(10);
binding.ReceiveTimeout = TimeSpan.MaxValue;
Post by Rick Lones
TImeSpans can be huge. Are you saying that an inactivity timeout of, e.g., a
thousand years would somehow not work for you here?
Submitted via EggHeadCafe
WCF Generic DataContract object Serializer
http://www.eggheadcafe.com/tutorials/aspnet/59ae2b9e-a3be-4cd5-a0ef-939a7abbdc3a/wcf-generic-datacontract-object-serializer.aspx
ZA
2011-02-04 16:16:41 UTC
Permalink
Hello! do you specify this information on the clientside config file?
Post by Fritz Hilgemann
Hello,
I have a WCF service and client (duplex) where the client is mainly waiting
for events via the callback. Unfortunately, it suffers from timing out,
since it does not call a dummy function once in a while. So, I would like to
change the inactivity timeout to infinite.
All I found how to do this in the configuration file. BUT: I am
intentionally not using a config file. Instead, I code the service behaviour
directly.
tcpBinding.ReliableSession.InactivityTimeout =
The point is, it accepts a TimeSpan, but appearently, Timespan does not
support "infinite".
Any ideas how to accomplish this infinite behaviour programatically?
Regards,
Fritz
Post by Steel
You may want to make a post at the forum below.
Msdn.en-US.wcf
Post by Fritz Hilgemann
Hello,
in ou project we use the following Binding and works perfectly.
<netTcpBinding>
<binding name="netTcpBinding"
receiveTimeout="Infinite">
<reliableSession inactivityTimeout="00:00:10"
enabled="true" />
</binding>
</netTcpBinding>
This is equal to the following code
binding.ReliableSession.Enabled = true;
binding.ReliableSession.InactivityTimeout =
TimeSpan.FromSeconds(10);
binding.ReceiveTimeout = TimeSpan.MaxValue;
Post by Rick Lones
TImeSpans can be huge. Are you saying that an inactivity timeout of, e.g., a
thousand years would somehow not work for you here?
Post by ZA
where do you specify this binding? on the client side config file? thank you
Submitted via EggHeadCafe
SQL Server CLR Stored Procedures for External Access
http://www.eggheadcafe.com/tutorials/aspnet/08c40d08-af4a-41f6-9352-91ac82b90078/sql-server-clr-stored-procedures-for-external-access.aspx
Heike und Roman Wagner
2011-02-04 16:41:28 UTC
Permalink
Post by ZA
Hello! do you specify this information on the clientside config file?
the binding must be the same on client and server. It is locatet in
<system.serviceModel><Bindings>
please use the WCF-configuration tool to edit these settings

Rick Lones
2010-10-06 15:29:44 UTC
Permalink
Post by Fritz Hilgemann
Hello,
I have a WCF service and client (duplex) where the client is mainly waiting
for events via the callback. Unfortunately, it suffers from timing out,
since it does not call a dummy function once in a while. So, I would like to
change the inactivity timeout to infinite.
All I found how to do this in the configuration file. BUT: I am
intentionally not using a config file. Instead, I code the service behaviour
directly.
tcpBinding.ReliableSession.InactivityTimeout =
The point is, it accepts a TimeSpan, but appearently, Timespan does not
support "infinite".
Any ideas how to accomplish this infinite behaviour programatically?
Regards,
Fritz
TImeSpans can be huge. Are you saying that an inactivity timeout of, e.g., a
thousand years would somehow not work for you here?
Loading...