Docuvieware session management

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
fbe
Posts: 3
Joined: Fri Sep 06, 2019 3:47 pm

Docuvieware session management

Post by fbe » Mon Sep 09, 2019 11:21 am

Hello,
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!

fbe
Posts: 3
Joined: Fri Sep 06, 2019 3:47 pm

Re: Docuvieware session management

Post by fbe » Thu Sep 12, 2019 4:38 pm

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?

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Docuvieware session management

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

Hi,

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,

Loïc

fbe
Posts: 3
Joined: Fri Sep 06, 2019 3:47 pm

Re: Docuvieware session management

Post by fbe » Mon Sep 16, 2019 11:33 am

Hi,
that's clearer now, thanks for the explanation

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest