Need a special offer?Find out if your project fits.
+

Expired OLAP cube sessionID

Answered
Michael Jiambalvo asked on June 11, 2021

Support,
We have an Angular app using the Flexmonster accelerator to connect to SSAS OLAP cubes.
So when a user is working with a pivot grid, then leaves for lunch, returns and refreshes the grid, they get a blank grid and an unauthorized user message.
Using the browser debugger and examining the response shows {"data":null,"error":{"message":"ERROR_SESSION_EXPIRED"}}
This is may be due to the SSAS default MinIdleSessionTimeout being set to 2700 seconds.
We are unable to make changes to the SSAS config. Does Flexmonster provide a way to keep a session alive? If so, how?
If not is there a way to capture the sessionID and signature after a cube has been connected to using the Flexmonster accelerator? This way we could make calls at some interval to keep the session alive.
Regards,
Mike Jiambalvo

3 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 14, 2021


Hello, Mike,
 
Thank you for reaching out to us.
 
Currently, we do not have a mechanism that would allow retrieving the sessionID. However, we came up with a workaround that you may find helpful for your case. The idea is to update the data preserving all the configured settings once in a while. It is achievable using the updateData method, which updates the data without cleaning the report. For example, you can subscribe to the reportchange and reportcomplete events and use them to start a timeout (e.g., 2600 seconds). If one of the events is triggered within this span, reset the timeout. Otherwise, call the updateData method passing the currently applied dataSource object as an argument:

flexmonster.updateData(flexmonster.getReport().dataSource);

It will reload the data from the server and refresh the timeout.
 
Please let us know if it works for you.
Looking forward to your feedback.
 
Kind regards,
Illia

Public
Michael Jiambalvo June 18, 2021

Hi Illia,
We have our Angular app hosted on one IIS server and our SSAS on another. The Flex accelerator is on the SSAS server with the Microsoft CORS module installed for IIS. We can load cube reports with no problem with this setup.
Have tried to use your solution to refresh the sessionID TTL but keep getting a 401 error.
So when making the call from the Angular web client to the Flex accelerator which is hosted on our SSAS server we get the following 401 Unauthorized error.
this.pivot.flexmonster.updateData(this.rptDataSource);
Request URL: http://[our_ssas_server]/api/accelerator/Handshaking
Request Method: POST
Status Code: 401 Unauthorized
Any ideas or suggestion?
Thanks, Mike

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 22, 2021


Hello, Mike,
 
Thank you for your question.
 
Please provide additional details about the issue:

  1. Is it connected with a recently raised question on the following forum thread?
  2. Is it only reproducible when using the updateData API call, or with any request made by Flexmonster?
  3. Had there been any changes on the client or server sides after which this issue occurred?

 
Also, make sure you pass the user's credentials along with every request made by Flexmosnter.
 
Looking forward to hearing from you.
 
Kind regards,
Illia

Please login or Register to Submit Answer