We're trying to track someone's path in WCM.
The .NET session id (HttpContext.Current.Session.SessionID)does not get reset when someone logs in or out of WCM. We need to recognize separate logins as separate visits.
Is there something in iMIS that we can use for this? something like Asi.ContentManagerNet.SessionState.SessionID?
We want to consider each login to WCM to be a unique activity.
Thanks.
Get logged in ID
Hello,
We use this code to get the ID of the user that is logged in. It will give you a blank result if no one is logged in, and it will change as the user changes. Please note that I believe this has changed for 15.2 , this code works on 15.1.x . To see the changes you need to make to it for it to work on 15.2 go here: http://www.imiscommunity.com/converting_a_15_1_3_ipart_for_use_in_imis_1...
public string GetCurrentiMISID()
{
string _id = "";
try
{
if (Asi.Security.AppPrincipal.CurrentIdentity.IsAuthenticated && Asi.Security.AppPrincipal.CurrentIdentity.ContactMaster != "")
{
_id = Asi.Security.AppPrincipal.CurrentIdentity.ContactMaster;
}
}
catch { }
return _id;
}
Hope this helps
James Harrison
www.visualantidote.com