国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

ASP.NET Passport SingOut 方法

2024-07-10 13:06:44
字體:
來源:轉載
供稿:網友
,歡迎訪問網頁設計愛好者web開發。public static void signout(string strsignoutdotgiffilename)
    {
      httpcontext httpcontext = httpcontext.current;
      string[] strs6 = new string[]{"mspauth", "mspprof", "mspconsent", "mspsecauth", "mspprofc"};
      string[] strs1 = strs6;
      strs6 = new string[]{"ticketdomain", "ticketdomain", "profiledomain", "securedomain", "ticketdomain"};
      string[] strs2 = strs6;
      strs6 = new string[]{"ticketpath", "ticketpath", "profilepath", "securepath", "ticketpath"};
      string[] strs3 = strs6;
      string[] strs4 = new string[5];
      string[] strs5 = new string[5];
      passportidentity passportidentity = null;
      int i = 0;
      httpcontext.response.clearheaders();
      try
      {
        if (httpcontext.user.identity is passportidentity)
        {
          passportidentity = (passportidentity)httpcontext.user.identity;
        }
        else
        {
          passportidentity = new passportidentity();
        }
        if (passportidentity != null && _ipassportver >= 3)
        {
          for (i = 0; i < 5; i++)
          {
            object local1 = passportidentity.getcurrentconfig(strs2[i]);
            if (local1 != null && local1 is string)
            {
              strs4[i] = (string)local1;
            }
          }
          for (i = 0; i < 5; i++)
          {
            object local2 = passportidentity.getcurrentconfig(strs3[i]);
            if (local2 != null && local2 is string)
            {
              strs5[i] = (string)local2;
            }
          }
        }
      }
      catch (exception)
      {
      }
      for (i = 0; i < 5; i++)
      {
        httpcookie httpcookie = new httpcookie(strs1[i], "");
        httpcookie.expires = new datetime(1998, 1, 1);
        if (strs4[i] != null && strs4[i].length > 0)
        {
          httpcookie.domain = strs4[i];
        }
        if (strs5[i] != null && strs5[i].length > 0)
        {
          httpcookie.path = strs5[i];
        }
        else
        {
          httpcookie.path = "/";
        }
        httpcontext.response.cookies.add(httpcookie);
      }
      httpcontext.response.expires = -1;
      httpcontext.response.cache.setcacheability(httpcacheability.nocache);
      httpcontext.response.appendheader("pragma", "no-cache");
      httpcontext.response.contenttype = "image/gif";
      httpcontext.response.writefile(strsignoutdotgiffilename);
      string str = httpcontext.request.querystring["ru"];
      if (str != null && str.length > 1)
      {
        httpcontext.response.redirect(str, false);
      }
    }
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 海宁市| 吉林省| 封丘县| 山丹县| 雷波县| 绥棱县| 武宣县| 桃源县| 台北市| 青田县| 灵山县| 九龙县| 米泉市| 石渠县| 平潭县| 鸡东县| 历史| 工布江达县| 嘉定区| 丰县| 古交市| 曲麻莱县| 荆州市| 克什克腾旗| 化德县| 祁连县| 海伦市| 七台河市| 涟源市| 中山市| 惠水县| 右玉县| 德惠市| 共和县| 佛坪县| 桐梓县| 武平县| 望城县| 博野县| 辉县市| 连山|