cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

What is the conceptual difference between a logontoken and a serializedsession? Should I prefer one over the other?

ISessionMgr sessionMgr = CrystalEnterprise.GetSessionMgr();
IEnterpriseSession enterpriseSession = sessionMgr.Logon([userName], [password], [cmsName], [authentication]);

// create token
string token = enterpriseSession.LogonTokenMgr.DefaultToken
...
// use token to recreate new EnterpriseSession
IEnterpriseSession enterpriseSession = sessionMgr.LogonWithToken(token);

// create serialized session
string serializedSession = enterpriseSession.SerializedSession;

// use token to recreate new EnterpriseSession
IEnterpriseSession enterpriseSession = sessionMgr.getSession(serializedSession);

Does the LogonWithToken method hit the repository where the getSession method does not? Is one smaller (fewer bytes) than the other? Is one faster?

PS: is there a way to mark code inline, rather than using italics as I've done?

0 Likes
View Entire Topic
TJe
Product and Topic Expert
Product and Topic Expert

One of the major differences is the open session behavior:

  • with a token: this will open another user session for the user
  • with serialized session: this will work in the same user session, no additional session is opened
first_last
Participant
0 Likes

If it opens a new session, does it automatically close the other? Does this tend to consume concurrent licenses?