tags:

views:

19

answers:

1

In my specific case: A WCF connection is established, but the only method with "IsInitiating=true" (the login method) is never called. What happens?

In case the connection is closed due to inactivity after some time: Which setting configures this timeout? Is there still a way for a client to keep the connection alive?

Reason for this question: I'm considering the above case as a possible security hole. Imagine many clients connecting to a server without logging in thus preventing other clients from connecting due to bandwidth problems or port shortage or lack of processing power or ...

Am I dreaming, or is this an actual issue?

+3  A: 

The WCF client side proxy will close the connection (if open) when it goes out of scope, e.g. when the method it is being used in terminates.

If you're using sessions (but that only kicks in if you actually have indeed established a session - after a method has been called), there's a inactivityTimeout setting in the sessions, both on the client and the server side - the smaller value "wins", so to speak.

If your "concurrentSessions" settings is quite low on your server, this might be an issue - but again, this only kicks in when there is an actual session in place, e.g. at least one method has been called - and in that case, the inactivity timeout on the session will clear out those unused sessions as needed.

marc_s
So there is really no way for the client to keep the connection alive by, for instance, attempting to call an IsInitializing=false method and handling the exception in a loop?
mafutrct
I don't think so - if the client calls a method with IsInitializing=false, then WCF will **not** establish a connection - so the client can't block it ...
marc_s
I'm going to trust you. I'll blame you if I get DDoSed ;)
mafutrct