Last active
December 5, 2016 23:08
-
-
Save stand-sure/24338388a4f3617e9eaf6c7fd48fa970 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Sets the session identifier if not previously set. | |
/// </summary> | |
/// <param name="context">Context.</param> | |
/// <param name="sid">Sid.</param> | |
static void SetSessionIdIfNotPreviouslySet(HttpContextBase context, | |
string sid) | |
{ | |
SetCookie(context, "sid", | |
string.IsNullOrEmpty(sid) ? Guid.NewGuid().ToString() : sid); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment