日期:2011-08-23  浏览次数:20420 次

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)
        {
     &