Page 1 of 1

Docuvieware session management

Posted: Mon Sep 09, 2019 11:21 am
by fbe
i'm currently testing Docuvieware lite to see if it can fit in our solution (Angular<-> .net web api).
There's something that I don't understand in the session management in web api:
To check if a session is still alive we use DocuViewareManager.IsSessionAlive(sessionId).
But to create a new session we use DocuViewareManager.CreateDocuViewareSession that takes both a sessionId and a controlId.
So what happens if I have a page with 2 webcontrols (with 2 different ids) on the same page (therefore using the same sessionId)?

Thanks in advance!

Re: Docuvieware session management

Posted: Thu Sep 12, 2019 4:38 pm
by fbe
Hi and thanks for the answer.
I'm sorry but it's still not clear to me.
Let's say that under DocuVieware session of id S1, I have a control of id C1 and another of id C2 on my current page.
First time the controller is called, both session (S1,C1) and (S1,C2) are created using DocuViewareManager.CreateDocuViewareSession(S1,C1) and DocuViewareManager.CreateDocuViewareSession(S1,C2).
Then if the user only use C1 for a long period of time (never calling the controller again during this time), DocuVieware session (S1,C2) might timeout.
After that , on the next call to the controller, how can I check that the DocuVieware session for (S1,C1) is active and can be reused and DocuVieware session for (S1,C2) is not and must be created again with CreateDocuViewareSession?

Re: Docuvieware session management

Posted: Sun Sep 15, 2019 6:56 pm
by Loïc

Okayyyyy. I had to remove my previous completely wrong answer to don't bring confusion to new readers. I am really sorry for that.

Basically the SessionID parameter used for DocuViewareManager.CreateDocuViewareSession(SessionID, ClientID) must be unique. The clientID will specify the name of the DocuVieware element on the client side.

If you subsequently call DocuViewareManager.CreateDocuViewareSession() with the same session identifier and a different ClientID a GdPictureStatus.Aborted status will be returned by the method. You can give a try.

If you want two different DocuVieware controls ob the same page you have to provide different Session and client ID parameter values.

Just let me know if you need any clarification.

With best regards,


Re: Docuvieware session management

Posted: Mon Sep 16, 2019 11:33 am
by fbe
that's clearer now, thanks for the explanation