I am reading the WCF doc for RC1 at the moment. I try to figure out how I may handle sessions. My first problem is that I do not know if I understand the same meaning for "session" as WCF do.
For me a session is for example:
- A database client connects to a database. With the connection a session will be established, which will be closed if the client wil shut down or the user logs out.
- A windows forms application connects to a windows service to do some work. A session will be established and hold as long as the client application is connected (session is secured with user credentials)
Now I am looking for a possibility to manage sessions via WCF.
I have 2 service contracts (IMyMethods and ISessionHandling) and I want to achieve that a client must have an active session (or what I understand about session) to call methods of the service IMyMethods...
I heard about sessions in WCF - are these the same session that I mean
Can I establish a session in WCF, manage its state and work with different service contracts in that session - as far as I know a WCF session is connected to the underlying service contract
Maybe you know some good examples for me.
thx for help
regards
Bastian

Where to start with sessions
Snow Teo
>>I know a WCF session is connected to the underlying service contract
Actually to a Service Instance not to the contract. In your case you can have a Service Implementation that implements the aggregation of the 2 service contracts and then can manage session across the methods.
Something like,
public interface IMynewContract : IMyFirstContract, IMySecondContract
{
---
}
ServiceBehaviour(SessionMode= SessionMode.Required)
public class MyService: IMyNewContract
{
---
}
Anyway, Iam not sure if this is what you are looking for.
Cappy Popp
Following links and sample may help
http://windowssdk.msdn.microsoft.com/en-us/library/aa354514.aspx
http://blogs.msdn.com/mahjayar/archive/2006/07/08/660176.aspx
http://msdn.microsoft.com/msdnmag/issues/06/06/WCFEssentials/