OpenDocument executes new session in CMC

I have an urgent question that I really need answered. I am using the sdk to log on to enterprise. This works fine and when I look at the sessions in the CMC for that user I can see one session. When I use this token to call the OpenDocument url, a second session is created for that users. Everytime I call OpenDocument passing in the token a new session is created. This is a major problem. I would have thought because I am passing in the token, that OpenDocument would attach itself to the first session.

Please can you help with this issue.


mkeating (BOB member since 2009-04-02)

Hi,

correct me if wrong,
you are problably using below code.
IEnterpriseSession boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( “Administrator”,“admin1”,“BOSERVER”,“secEnterprise”);

IInfoStore boInfoStore =(IInfoStore) boEnterpriseSession.getService(“InfoStore”);

ILogonTokenMgr token = boEnterpriseSession.getLogonTokenMgr();
String mytoken = token.getDefaultToken();
and then using “mytoken” in URL.

Instead use createWCAToken("",100,1)
arg1 if left blank will allow any computer access present in network

createWCAToken(java.lang.String clientComputerName, int validMinutes, int validNumOfLogons)
Creates a logon token that can be used for multiple logons without increasing the session count.


Praveen Gawande :india: (BOB member since 2009-04-25)

For BOXIR2 SP4, i have been using
LogonTokenMgr.CreateLogonTokenEx("", 30, 1)

will this create new sessions in the CMC? please guide me


sakshi :india: (BOB member since 2006-10-10)

Hi Sakshi,

As far as I know and seen in my system using logon token created session.
So I made changes in the my custom code.
Even after invalidating the BO session. 1 extra session was seen in CMC

I started using “createWCAToken(”",100,1)"

you can use posted code to test it with diffrent kinds token functions from below link.

http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/BOE_SDK/boesdk_java_api_doc/doc/boesdk_java_apiRef/com/crystaldecisions/sdk/occa/security/ILogonTokenMgr.html

do revert in case of any queries.

Thanks,
Praveen.


Praveen Gawande :india: (BOB member since 2009-04-25)

Thank you Praveen, has helped me alot
Cheers


sakshi :india: (BOB member since 2006-10-10)

Thanks Praveen for your help. I tried

token = enterpriseSession.LogonTokenMgr.CreateWCAToken("", 100, 1);

but I keep getting the following error -
A logon token cannot be created with an expiry time of more than 1440 minutes.

However the following did work:

token = enterpriseSession.LogonTokenMgr.CreateWCAToken("", 1, -1);

do you see any issue with using these params.

thanks again


mkeating (BOB member since 2009-04-02)