SecureConversation and establishSecurityContext

What is default value of establishSecurityContext attribute in binding element?

If it is set to true and write following code (BTW: server side code is per-call) :

using (ChannelFactory<IService> factory = new ChannelFactory<IService>())

{

....

}

My understanding is that secure conversation (i.e. WS-SecureConversation) ends once the "using" block exists? Any subsequent executions of the above code will re-establish the secure conversation with the server again. Is this correct?

Thanks.

[575 byte] By [RRaghu] at [2007-12-23]
# 1

for wshttpbinding,by default establishSecurityContext=true,it may be different for other bindings(if you create binding config in svcconfigeditor,it will show you all default settings for that binding)

The moment you close the proxy(or dispose),you are destroying security session also,so if you want to connect to svc again,you have to establishSecurityContext again(if you want,you can disable establishSecurityContext option)

end of using block,we always call dispose of that object.

-Thank you

Madhu

MadhuPonduru-MSFT at 2007-8-30 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...

Visual Studio Orcas

Site Classified