摘要: Startup.cs文件中的ConfigureServices方法配置: #region Session内存缓存 services.Configure<CookiePolicyOptions>(options => { options.CheckConsentNeeded = context => 阅读全文
posted @ 2018-08-09 15:36 王杰轲 阅读(2516) 评论(0) 推荐(1) 编辑
摘要: 在Startup.cs文件中的ConfigureServices方法中加入如下代码: //配置跨域处理 services.AddCors(options => { options.AddPolicy("any", builder => { builder.AllowAnyOrigin() //允许任 阅读全文
posted @ 2018-08-09 15:34 王杰轲 阅读(2293) 评论(0) 推荐(0) 编辑
摘要: 在ajax 请求是也要加相应的东西 $.ajax({ url:url, //加上这句话 xhrFields: { withCredentials: true } success:function(result){ alert("test"); }, error:function(){ } }); w 阅读全文
posted @ 2018-08-09 15:28 王杰轲 阅读(1593) 评论(18) 推荐(1) 编辑