其他分享
首页 > 其他分享> > net5中WebApi中使用Session

net5中WebApi中使用Session

作者:互联网

在Startup.cs中配置Session

  1. 注入session的服务
    image

  2. 在Configure方法里使用该服务的中间件
    app.UseSession();

标签:WebApi,Configure,session,app,中间件,Session,net5
来源: https://www.cnblogs.com/fhzmasl/p/16220788.html