/// <summary> /// Public method used to create an instance of the custom Profiles session object. /// </summary> public string SessionCreate() { ProfilesSearchAPI.Utilities.DataIO dataio = new ProfilesSearchAPI.Utilities.DataIO(); Session session = new Session(); string hostname = System.Net.Dns.GetHostName(); string ipaddress = string.Empty; try { ipaddress = System.Net.Dns.GetHostAddresses(hostname).GetValue(1).ToString(); } catch (Exception ex) { ProfilesSearchAPI.Utilities.DebugLogging.Log(ex.Message + " ++ " + ex.StackTrace); ipaddress = ""; } session.RequestIP = ipaddress; session.UserAgent = "Search API"; dataio.SessionCreate(ref session); //Store the object in the current session of the user. return(session.SessionID); }
/// <summary> /// Public method used to create an instance of the custom Profiles session object. /// </summary> public string SessionCreate() { ProfilesSearchAPI.Utilities.DataIO dataio = new ProfilesSearchAPI.Utilities.DataIO(); Session session = new Session(); string hostname = System.Net.Dns.GetHostName(); string ipaddress = string.Empty; try { ipaddress = System.Net.Dns.GetHostAddresses(hostname).GetValue(1).ToString(); } catch (Exception ex) { ProfilesSearchAPI.Utilities.DebugLogging.Log(ex.Message + " ++ " + ex.StackTrace); ipaddress = ""; } session.RequestIP = ipaddress; session.UserAgent = "Search API"; dataio.SessionCreate(ref session); //Store the object in the current session of the user. return session.SessionID; }