我正在使用netframework1和iis8。我已将设置添加到web.config
<system.web>
<httpCookies httpOnlyCookies="true" requireSSL="true" />
<authentication>
<forms cookieless="UseDeviceProfile" requireSSL="true" />
</authentication>
<roleManager cookieRequireSSL="true" />
</system.web>
但是我的应用程序会话cookie不安全。 请帮助。
也在startup.cs上编码
services.AddSession(options =>
{
options.CookieHttpOnly = true;
});
app.UseCookieAuthentication(opt =>
{
opt.CookieSecure = Microsoft.AspNet.Authentication.Cookies.CookieSecureOption.Always;
opt.CookieHttpOnly = true;
});