简体   繁体   English

在Session_End C#上清除Cookie

[英]Clear Cookies on Session_End C#

Is it possible to clear the browser's cookie on Session_End? 是否可以在Session_End清除浏览器的cookie? Given that there is no Context, no Request and no Response? 假设没有上下文,没有请求也没有响应?

Also, it is not possible to put the values on the session instead of in the cookies. 同样,也不能将值放在会话中,而不能放在cookie中。 This is being done by a third party application. 这是由第三方应用程序完成的。

Edit: I forgot to mention that the site is using SSO. 编辑:我忘了提到该站点正在使用SSO。 And the cookie that I am trying to access is the SSO cookie. 我尝试访问的cookie是SSO cookie。

No, you cannot do anything to the cookies in Session_End as that is called asynchronously by the server after a timeout. 不可以,您不能对Session_End的cookie进行任何操作,因为超时后服务器会异步调用该cookie。 At that point there is no ongoing http request from the web browser, so there is no open communication channel to the browser. 那时,没有来自Web浏览器的正在进行的http请求,因此没有到浏览器的开放通信通道。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM