需要Cookie清除帮助 [英] Cookie Clearing Help Required

查看:89
本文介绍了需要Cookie清除帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在制作一个使用OAuth通过Gmail,twitter和yahoo登录的应用程序

我正在使用此饼干制作
FormAuthentication.SetAuthCookie(username,false)

问题是,当我单击注销按钮时,它没有从这些站点中的任何一个注销(如果我已登录)

如何注销时清除Cookie

这是我的登出功能

Hi,
I am making an application in which i have used OAuth for loging with Gmail,twitter and yahoo

I am making cookie by using this
FormAuthentication.SetAuthCookie(username,false)

The problem is when i click on logout button it doesn''t loggedout from any of these sites(if i logged in)

How can i clear cookies on logout

this is my logout function

Session.Clear();
           FormsAuthentication.SignOut();
           HttpCookie cookie1 = new HttpCookie(FormsAuthentication.FormsCookieName, "");
           cookie1.Expires = DateTime.Now.AddYears(-1);
           Response.Cookies.Add(cookie1);



如果我使用存储在数据库中的用户名和密码登录,该方案将正常工作.



The scenario is working fine if i login with the username and password stored in my database

推荐答案

亲爱的syed,

查看这篇文章,

关于Cookie的护理和处理 [
Dear syed,

Check this article,

On The Care and Handling of Cookies[^]

Hope it''ii helps you...

Regards,
Bluesathish


这篇关于需要Cookie清除帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆