Hi folks,
We have an issue with multiple sessions in the CMC when we are logging into BI 4.1 SP6 via custom.jsp by using the logon token method. The real issue is when we are subsequently looking at the BI audit database and find that the Logon events (in ADS_EVENT) have one Session_ID and the subsequent viewing and refreshing of reports have a different Session_ID. We are going to have to load various bits of the audit database into our own application audit database. We would like to be able to get at IP address, PC Name, etc. but these are stored against the Logon events and because the Session_ID's are different, we cannot seem to link back to the appropriate Logon event. This is an issue as we would like to append a single row of data into our database which has report name, username, date/time, machine name, SQL and IP address.
To hopefully achieve this I've been attempting to log in using the serialised session method instead of the logon token method in the hope that this will be tied to the single session. However, I'm not sure how to get this working on BI 4.1 SP6 or if it works at all. The two snippets of code below are using both methods. The logon token method works, the serialised session method does not. The serialised session method as XI 3.1 code I believe so the question is what, if anything, can I change to get it to work? Could it be that the ivsLogonSession parameter no longer exists and that it's now called something else? Hopefully this approach hasn't been deprectaed. Or perhaps there's another way to achieve what we need? Any help would be greatly appreciated.
This logon token method works (but we have the issue described above):
IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon(username, password, bicluster, authType);
ILogonTokenMgr tokenMgr = enterpriseSession.getLogonTokenMgr();
token = tokenMgr.getDefaultToken();
session.setAttribute("token",token);
response.sendRedirect("logon/start.do?ivsLogonToken="+token);
This serialised session method does not work and when it gets to the sendRedirect I get a Page cannot be displayed error:
IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon(username, password, bicluster, authType);
String encodedSes = enterpriseSession.getSerializedSession();
response.sendRedirect("logon/start.do?ivsLogonSession="+URLEncoder.encode(encodedSes));