using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Spaces;

public partial class Logout : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string account=SpacesContext.Current.Context.User.Identity.Name;
        //string backUrl = string.Format(Config.GetConfig().DefaultDomain, account);
        Response.Write(FormsAuthentication.CookieDomain);
            //Globals.GetSiteUrls().Default(SpacesContext.Current.Context.User.Identity.Name);
       //System.Web.Security.FormsAuthentication.SetAuthCookie("", false);
        Request.Cookies.Clear();
        Request.Cookies.Remove(FormsAuthentication.FormsCookieName);
        FormsAuthentication.SignOut();
        
        //Response.Write(Globals.ApplicationPath);
       // if (account != string.Empty)
            Response.Redirect(Globals.GetSiteUrls().HomePage());
       // else
        //    Response.Redirect(Globals.ApplicationPath);
    }
}
