【发布时间】:2011-12-22 13:29:11
【问题描述】:
我应该选择哪个绑定来启用会话以下是我的服务接口:
[ServiceContract(SessionMode=SessionMode.Required)]
public interface IAkessaAbstractionService
{
[OperationContract(IsInitiating=true)]
LoginDTO Login(string Username, byte[] Password, bool ForcefulLogin);
[OperationContract(IsInitiating=false)]
string[] names();
}
当我使用 WSHttpBinding() 因为 basicHttpBinding 不支持会话时,我收到以下错误:
完成频道验收时出现异常。 System.NotSupportedException:不支持通道类型 System.ServiceModel.Channels.IReplySessionChannel 在等等等等……
当我使用 WSDualHttpBinding() 时,它会抛出以下错误:
System.NotImplementedException:请求的功能未实现。 在 System.ServiceModel.WSDualHttpBinding.CreateBindingElements () [0x00000] 在 :0 在 System.ServiceModel.Channels.CustomBinding..ctor (System.ServiceModel.Channels.Binding 绑定) [0x00000] 在 :0
我使用的是单声道版本 2.10.2。
【问题讨论】: