ApiController使用Session验证出现Null解决方案

问题描述

在服务端保存登录信息,出现异常信息

image

分析发现HttpContext.Current.Session为null

解决方案

执行时出报异常,要在Global.asax里添加:开启Session功能

image

原文地址:https://www.cnblogs.com/zsy/p/5219333.html