diff --git a/SampleApplications/SDK/Opc.Ua.Server/Server/StandardServer.cs b/SampleApplications/SDK/Opc.Ua.Server/Server/StandardServer.cs index ee84275320..23e3c0f7ee 100644 --- a/SampleApplications/SDK/Opc.Ua.Server/Server/StandardServer.cs +++ b/SampleApplications/SDK/Opc.Ua.Server/Server/StandardServer.cs @@ -673,11 +673,6 @@ namespace Opc.Ua.Server } catch (ServiceResultException e) { - if (e.StatusCode == StatusCodes.BadSessionNotActivated) - { - return CreateResponse(requestHeader, e); - } - lock (ServerInternal.DiagnosticsWriteLock) { ServerInternal.ServerDiagnostics.RejectedRequestsCount++; diff --git a/SampleApplications/SDK/Opc.Ua.Server/Session/SessionManager.cs b/SampleApplications/SDK/Opc.Ua.Server/Session/SessionManager.cs index 724d899953..637e5616f7 100644 --- a/SampleApplications/SDK/Opc.Ua.Server/Session/SessionManager.cs +++ b/SampleApplications/SDK/Opc.Ua.Server/Session/SessionManager.cs @@ -404,6 +404,7 @@ namespace Opc.Ua.Server // remember activation bool activated = session.Activated; + bool validated = session.ValidatedBeforeActivate; // close the session. session.Close(); @@ -413,11 +414,6 @@ namespace Opc.Ua.Server { m_server.ServerDiagnostics.CurrentSessionCount--; } - - if (!activated) - { - throw new ServiceResultException(StatusCodes.BadSessionNotActivated); - } } }