09/28/2022
Hi there
I am using an OPC UA client written in .NET Standard, running inside a docker container. The session has a rather high keep-alive time (10 minutes) on the server. Therefore after restarting the container, I want to be able to use the same session which I've already been using before. I can't use a new session and transfer subscriptions, because the TransferSubscription service is not supported by the server.
Is there an example on how to do this via the .NET Standard SDK? Whats a good starting point? Would it be possible to just serialize the session object, save it to disk, deserialize it after module restart and use it to reconnect again? Or is there any specific functionality of the SDK which supports this out of the box? Unfortunately I wasn't able to find anything in the examples.
Thanks
09/28/2022
Randy Armstrong said
In theory, you can recover a session after reboot with the authentication token/session id. However, the APIs may not provide a way for the application to supply an authentication token.
Yes, due to the specs it should be possible to create a new secure channel and activate the session by using the same credentials like when the session has been created. I'm just not sure if and how its possible by using the C# SDK, since its a little bit hard to understand the SDKs code for me.
Basically all I want is to get the missed alarms / notification messages after rebooting the client. My server can hold longer sessions, but can't transfer subscriptions to a new session.
05/30/2017
My server can hold longer sessions, but can't transfer subscriptions to a new session.
Transfer subscriptions is a mandatory requirement. The server should be updated. Your problems illustrate why.
You could modify the client SDK code save the authentication token and recover after restart.
1 Guest(s)