我想爲WCF服務禁用會話,通過改變服務合同禁用會話
[ServiceContract(Namespace = "http://company.com/Services/", SessionMode = SessionMode.NotAllowed)]
public interface IService
{ }
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service: IService
{ }
但後來我踏入操作與調試器,我可以看到HttpContext.Current.Session是有效的對象。
我錯過了WCF操作的不可用會話狀態?