This .NET code snippet will NOT actually create a cookie, right?

Posted by Ryan on Stack Overflow See other posts from Stack Overflow or by Ryan
Published on 2010-05-04T18:26:13Z Indexed on 2010/05/04 18:38 UTC
Read the original article Hit count: 218

Filed under:
|
|

I just realized that this cookie is not showing up like it should, and I checked the code which was not written by me but I am pretty sure that this is NOT enough to create a cookie right??

public static void CreateSSOCookies(string tokenID)
            {
                System.Web.HttpContext.Current.Response.Cookies["ssocookies"].Domain = System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"].ToString().ToLower();
                System.Web.HttpContext.Current.Response.Cookies["ssocookies"].Value = tokenID.ToString();
                System.Web.HttpContext.Current.Response.Cookies["ssocookies"].Path = "~/";
                System.Web.HttpContext.Current.Response.Cookies["ssocookies"].Expires = DateTime.Now.AddDays(7);
            }

If it does work, where is the cookie then? Is the cookie name 'ssocookies' ?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about cookies