我得到了运行自定义绑定的WCF服务,现在它使用httpTransport。如何使用WCF获取PerSession上下文?
<customBinding>
<binding name="myHttpBindingConf">
<context contextManagementEnabled="true" protectionLevel="None"
contextExchangeMechanism="ContextSoapHeader" />
<textMessageEncoding/>
<httpTransport useDefaultWebProxy="false" />
</binding>
</customBinding>
我做了一个自定义IExtension<OperationContext>
去购买在特定的情况下我的数据由以下这些指令: http://hyperthink.net/blog/a-simple-ish-approach-to-custom-context-in-wcf/
我想用一个ContextMode.PerSession
上下文。
哪个运输选择获得会话管理?
如何设置新的传输并启用对象发现?
如何强制PerSession上下文?
我将它与WsHttpBinding的运行以及指定。 如果您遇到同样的麻烦,您可以在这里查看我的Web.config: http://code.google.com/p/tte-knbc/source/browse/trunk/BusinessLayer/Web.config 您可能会在CECIL-L – christophe31 2010-06-16 13:30:10