diff --git a/TestServer/ServerForm.cs b/TestServer/ServerForm.cs index 471d8ec..8d53c4b 100644 --- a/TestServer/ServerForm.cs +++ b/TestServer/ServerForm.cs @@ -147,7 +147,19 @@ namespace TestServer this.initializing = true; this.connected = false; - UpdateButtons(); + + this.serverContext.Dispose(); + this.serverContext = new ServerContext( + serverCred, + ContextAttrib.AcceptIntegrity | + ContextAttrib.ReplayDetect | + ContextAttrib.SequenceDetect | + ContextAttrib.MutualAuth | + ContextAttrib.Delegate | + ContextAttrib.Confidentiality + ); + + this.BeginInvoke( (Action) UpdateButtons ); }