on ‎2019 Feb 27 7:52 PM
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?
Request clarification before answering.
As it is the same user, would assume it doesn't consume another concurrent license.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Logon is an expensive operation from a performance standpoint, so tokens that are shared with existing sessions are faster.
CreateLogonToken(numUses, numMinutes)
CreateWCAToken()
SerializedSession()
Dan
If you want to use restful, then you must log on and create an X-SAP-LogonToken.
you can log on using
With an X-SAP-LogonToken, regardless of how it was created, it is terminated when the originating session is logged off or timed out, but an additional license is not used if created from an existing session (/logon/trusted). In this aspect, it behaves like a WCAToken. If you use this token outside of RESTful, (ie openDocument) then it will consume a license, which is like a default token.
So in answer to your question, a RESTful token is sort of a combination of default and wca tokens. You will need to consider how you will be using restful and what will or can happen to the originating session when going from one SDK to another.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.