在WEB API中启用session
WEB API中启用session
下载地址
用户评论
这没必要下载坑啊
只需要在文件Global.asax中添加如下代码即可: publicoverridevoidInit() {//注册事件 this.AuthenticateRequest+=MvcApplication_AuthenticateRequest; } //开户session支持 privatevoidMvcApplication_AuthenticateRequest(objectsender,EventArgse) {//启用webapi支持session会话