diff --git a/SampleApplications/Samples/GDSClient/App.config b/SampleApplications/Samples/GDSClient/App.config
index cc0f84654f..3464075567 100644
--- a/SampleApplications/Samples/GDSClient/App.config
+++ b/SampleApplications/Samples/GDSClient/App.config
@@ -1,8 +1,8 @@
-
+
-
+
@@ -47,4 +47,13 @@
-
+
+
+
+
+
+
+
+
+
+
diff --git a/SampleApplications/Samples/GDSClient/Controls/ApplicationCertificateControl.cs b/SampleApplications/Samples/GDSClient/Controls/ApplicationCertificateControl.cs
index d5c3e0963a..c6643aed43 100644
--- a/SampleApplications/Samples/GDSClient/Controls/ApplicationCertificateControl.cs
+++ b/SampleApplications/Samples/GDSClient/Controls/ApplicationCertificateControl.cs
@@ -31,9 +31,9 @@ namespace Opc.Ua.GdsClient
[DefaultValue(false)]
public bool RequestNewPrivateKey { get; set; }
- public void Initialize(
+ public async void Initialize(
GlobalDiscoveryClientConfiguration configuration,
- GlobalDiscoveryServer gds,
+ GlobalDiscoveryServer gds,
PushConfigurationServer server,
RegisteredApplication application,
bool isHttps)
@@ -78,7 +78,7 @@ namespace Opc.Ua.GdsClient
id.StoreType = CertificateStoreIdentifier.DetermineStoreType(id.StoreType);
id.SubjectName = application.CertificateSubjectName.Replace("localhost", System.Net.Dns.GetHostName());
- certificate = id.Find(true);
+ certificate = await id.Find(true);
}
}
}
@@ -105,12 +105,12 @@ namespace Opc.Ua.GdsClient
CertificateIdentifier id = new CertificateIdentifier()
{
- StoreType = CertificateStoreType.Windows,
- StorePath = "LocalMachine\\My",
- SubjectName = "CN=" + url.DnsSafeHost
+ StoreType = CertificateStoreType.Windows,
+ StorePath = "LocalMachine\\My",
+ SubjectName = "CN=" + url.DnsSafeHost
};
- certificate = id.Find();
+ certificate = await id.Find();
}
}
}
@@ -331,7 +331,7 @@ namespace Opc.Ua.GdsClient
{
byte[] nonce = new byte[32];
System.Security.Cryptography.RandomNumberGenerator.Create().GetBytes(nonce);
- certificateRequest = m_server.CreateCSR(null, null, false, nonce);
+ certificateRequest = m_server.CreateCertificateRequest(null, null, null, false, nonce);
newPrivateKeyRequired = false;
if (m_server.Endpoint != null && m_server.Endpoint.Description.ServerCertificate != null)
@@ -342,7 +342,7 @@ namespace Opc.Ua.GdsClient
if (newPrivateKeyRequired || RequestNewPrivateKey || m_certificate == null)
{
- m_certificatePassword = Guid.NewGuid().ToString();
+ m_certificatePassword = null; // Guid.NewGuid().ToString();
string privateKeyFormat = GetPrivateKeyFormat();
string[] domainNames = GetDomainNames();
@@ -379,7 +379,7 @@ namespace Opc.Ua.GdsClient
}
}
- certificateRequest = CertificateFactory.CreateRequest(
+ certificateRequest = CertificateAuthority.CreateRequest(
certificate,
privateKey,
isPemKey,
@@ -400,11 +400,11 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
- private void CertificateRequestTimer_Tick(object sender, EventArgs e)
+ private async void CertificateRequestTimer_Tick(object sender, EventArgs e)
{
try
{
@@ -441,7 +441,7 @@ namespace Opc.Ua.GdsClient
{
if (!String.IsNullOrEmpty(m_application.CertificatePrivateKeyPath))
{
- string path = Utils.GetAbsoluteFilePath(m_application.CertificatePrivateKeyPath, true, true, false);
+ string path = Utils.GetAbsoluteFilePath(m_application.CertificatePrivateKeyPath, true, true, true);
if (path != null)
{
@@ -449,7 +449,7 @@ namespace Opc.Ua.GdsClient
{
var x509 = new X509Certificate2(certificate);
var oldPfx = new X509Certificate2(path, (string)null, X509KeyStorageFlags.Exportable);
- var newPfx = CertificateFactory.Replace(x509, oldPfx);
+ var newPfx = CertificateAuthority.Replace(x509, oldPfx);
var bytes = newPfx.Export(X509ContentType.Pfx);
File.WriteAllBytes(path, bytes);
}
@@ -467,28 +467,28 @@ namespace Opc.Ua.GdsClient
SubjectName = m_application.CertificateSubjectName.Replace("localhost", System.Net.Dns.GetHostName())
};
- var oldPfx = cid.Find(true);
+ var oldPfx = await cid.Find(true);
if (oldPfx != null)
{
- var newPfx = CertificateFactory.Replace(x509, oldPfx);
+ var newPfx = CertificateAuthority.Replace(x509, oldPfx);
using (var store = CertificateStoreIdentifier.OpenStore(m_application.CertificateStorePath))
{
- store.Delete(oldPfx.Thumbprint);
- store.Add(newPfx);
+ await store.Delete(oldPfx.Thumbprint);
+ await store.Add(newPfx);
}
}
}
}
}
-
+
// save private key.
else
{
if (!String.IsNullOrEmpty(m_application.CertificatePrivateKeyPath))
{
- string path = Utils.GetAbsoluteFilePath(m_application.CertificatePrivateKeyPath, true, true, false);
+ string path = Utils.GetAbsoluteFilePath(m_application.CertificatePrivateKeyPath, true, true, true);
if (path != null)
{
@@ -505,18 +505,18 @@ namespace Opc.Ua.GdsClient
SubjectName = m_application.CertificateSubjectName
};
- var oldCertificate = cid.Find();
+ var oldCertificate = await cid.Find();
using (var store = CertificateStoreIdentifier.OpenStore(m_application.CertificateStorePath))
{
if (oldCertificate != null)
{
- store.Delete(oldCertificate.Thumbprint);
+ await store.Delete(oldCertificate.Thumbprint);
}
var x509 = new X509Certificate2(privateKey, new System.Security.SecureString(), X509KeyStorageFlags.Exportable);
x509 = CertificateFactory.Load(x509, true);
- store.Add(x509);
+ await store.Add(x509);
}
}
}
@@ -533,7 +533,7 @@ namespace Opc.Ua.GdsClient
if (store.FindByThumbprint(x509.Thumbprint) == null)
{
- store.Add(new X509Certificate2(issuerCertificate));
+ await store.Add(new X509Certificate2(issuerCertificate));
}
}
}
@@ -547,8 +547,8 @@ namespace Opc.Ua.GdsClient
privateKey = x509.Export(X509ContentType.Pfx);
}
- bool applyChanges = m_server.UpdateCertificate(null, certificate, GetPrivateKeyFormat(), privateKey, issuerCertificates);
-
+ bool applyChanges = m_server.UpdateCertificate(null, null, certificate, GetPrivateKeyFormat(), privateKey, issuerCertificates);
+
if (applyChanges)
{
MessageBox.Show(
@@ -574,7 +574,7 @@ namespace Opc.Ua.GdsClient
return;
}
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
CertificateRequestTimer.Enabled = false;
}
}
@@ -591,7 +591,7 @@ namespace Opc.Ua.GdsClient
if (se == null || se.StatusCode != StatusCodes.BadServerHalted)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
diff --git a/SampleApplications/Samples/GDSClient/Controls/ApplicationTrustListControl.cs b/SampleApplications/Samples/GDSClient/Controls/ApplicationTrustListControl.cs
index 9a1114111e..be2dca808a 100644
--- a/SampleApplications/Samples/GDSClient/Controls/ApplicationTrustListControl.cs
+++ b/SampleApplications/Samples/GDSClient/Controls/ApplicationTrustListControl.cs
@@ -68,7 +68,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -82,7 +82,7 @@ namespace Opc.Ua.GdsClient
PullFromGds(true);
}
- private void DeleteExistingFromStore(string storePath)
+ private async void DeleteExistingFromStore(string storePath)
{
if (String.IsNullOrEmpty(storePath))
{
@@ -91,7 +91,8 @@ namespace Opc.Ua.GdsClient
using (ICertificateStore store = CertificateStoreIdentifier.OpenStore(storePath))
{
- foreach (var certificate in store.Enumerate())
+ X509Certificate2Collection certificates = await store.Enumerate();
+ foreach (var certificate in certificates)
{
if (store.GetPrivateKeyFilePath(certificate.Thumbprint) != null)
{
@@ -130,7 +131,7 @@ namespace Opc.Ua.GdsClient
}
}
- store.Delete(certificate.Thumbprint);
+ await store.Delete(certificate.Thumbprint);
}
}
}
@@ -139,7 +140,7 @@ namespace Opc.Ua.GdsClient
{
try
{
- NodeId trustListId = m_gds.GetTrustList(m_application.ApplicationId, 0);
+ NodeId trustListId = m_gds.GetTrustList(m_application.ApplicationId, null);
if (trustListId == null)
{
@@ -237,7 +238,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -269,7 +270,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -295,7 +296,7 @@ namespace Opc.Ua.GdsClient
if (se == null || se.StatusCode != StatusCodes.BadServerHalted)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
diff --git a/SampleApplications/Samples/GDSClient/Controls/RegisterApplicationControl.cs b/SampleApplications/Samples/GDSClient/Controls/RegisterApplicationControl.cs
index 028e03608d..d842e8e37d 100644
--- a/SampleApplications/Samples/GDSClient/Controls/RegisterApplicationControl.cs
+++ b/SampleApplications/Samples/GDSClient/Controls/RegisterApplicationControl.cs
@@ -1,17 +1,12 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Drawing;
-using System.Data;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
-using System.Reflection;
using System.Security.Cryptography.X509Certificates;
-using System.Xml;
using System.Xml.Serialization;
-using Opc.Ua.Client;
using Opc.Ua.Gds;
namespace Opc.Ua.GdsClient
@@ -550,7 +545,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -567,7 +562,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -597,7 +592,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -642,7 +637,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -668,7 +663,7 @@ namespace Opc.Ua.GdsClient
if (String.IsNullOrWhiteSpace(ApplicationUriTextBox.Text))
{
- ApplicationUriTextBox.Text = Utils.GetApplicationUriFromCertficate(certificate);
+ ApplicationUriTextBox.Text = Utils.GetApplicationUriFromCertificate(certificate);
}
if (String.IsNullOrWhiteSpace(DiscoveryUrlsTextBox.Text) && RegistrationTypeComboBox.SelectedIndex != ClientPullManagement)
@@ -763,7 +758,7 @@ namespace Opc.Ua.GdsClient
if (String.IsNullOrWhiteSpace(ApplicationUriTextBox.Text))
{
- ApplicationUriTextBox.Text = Utils.GetApplicationUriFromCertficate(certificate);
+ ApplicationUriTextBox.Text = Utils.GetApplicationUriFromCertificate(certificate);
}
}
catch (Exception)
@@ -778,7 +773,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -825,7 +820,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -894,7 +889,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -941,7 +936,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -992,7 +987,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1037,7 +1032,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1082,7 +1077,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1127,7 +1122,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1277,7 +1272,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1386,7 +1381,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1413,7 +1408,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1477,7 +1472,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1574,7 +1569,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1648,7 +1643,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1661,7 +1656,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
@@ -1714,7 +1709,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(Parent.Text, exception);
+ MessageBox.Show(Parent.Text + ": " + exception.Message);
}
}
diff --git a/SampleApplications/Samples/GDSClient/Controls/SetTypeDlg.cs b/SampleApplications/Samples/GDSClient/Controls/SetTypeDlg.cs
index 9532b1d0bd..fc081d6936 100644
--- a/SampleApplications/Samples/GDSClient/Controls/SetTypeDlg.cs
+++ b/SampleApplications/Samples/GDSClient/Controls/SetTypeDlg.cs
@@ -191,7 +191,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- Opc.Ua.Configuration.ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
#endregion
diff --git a/SampleApplications/Samples/GDSClient/GlobalDiscoveryClient.csproj b/SampleApplications/Samples/GDSClient/GlobalDiscoveryClient.csproj
index 47e12a8856..c30a5203bb 100644
--- a/SampleApplications/Samples/GDSClient/GlobalDiscoveryClient.csproj
+++ b/SampleApplications/Samples/GDSClient/GlobalDiscoveryClient.csproj
@@ -44,7 +44,15 @@
app.manifest
+
+ ..\..\..\packages\Cannoli.Services.1.0.0.1\lib\net45\Cannoli.Services.dll
+ True
+
+
+ ..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll
+ True
+
False
..\..\SDK\Opc.Ua.Client\bin\Debug\net46\Opc.Ua.Client.dll
@@ -138,6 +146,7 @@
Designer
+
SettingsSingleFileGenerator
Settings.Designer.cs
diff --git a/SampleApplications/Samples/GDSClient/MainForm.cs b/SampleApplications/Samples/GDSClient/MainForm.cs
index 26c242f733..1d66a916a9 100644
--- a/SampleApplications/Samples/GDSClient/MainForm.cs
+++ b/SampleApplications/Samples/GDSClient/MainForm.cs
@@ -1,15 +1,10 @@
using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
using System.Drawing;
-using System.Linq;
-using System.Text;
using System.Windows.Forms;
-using Opc.Ua;
using Opc.Ua.Client;
using Opc.Ua.Configuration;
using Opc.Ua.Gds;
+using Opc.Ua.Client.Controls;
namespace Opc.Ua.GdsClient
{
@@ -18,7 +13,7 @@ namespace Opc.Ua.GdsClient
public MainForm(ApplicationInstance application)
{
InitializeComponent();
- Icon = ConfigUtils.GetAppIcon();
+ Icon = ClientUtils.GetAppIcon();
m_application = application;
@@ -110,21 +105,16 @@ namespace Opc.Ua.GdsClient
}
}
- private void Server_AdminCredentialsRequired(object sender, AdminCredentialsRequiredEventArgs e)
+ private async void Server_AdminCredentialsRequired(object sender, AdminCredentialsRequiredEventArgs e)
{
try
{
- var identity = new UserIdentityDialog().ShowDialog(this, "Please specify the administrator credentials for the Server.", m_identity);
-
- if (identity != null)
- {
- e.Credentials = m_identity = identity;
- e.CacheCredentials = true;
- }
+ e.Credentials = await OAuth2Client.GetIdentityToken(m_gds.Application.ApplicationConfiguration, m_gds.EndpointUrl);
+ e.CacheCredentials = true;
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -227,7 +217,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -256,7 +246,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -275,7 +265,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -299,7 +289,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -331,7 +321,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -365,7 +355,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -386,7 +376,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -398,7 +388,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -411,7 +401,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -424,7 +414,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -437,7 +427,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -450,7 +440,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -463,7 +453,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -475,7 +465,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
@@ -515,7 +505,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception exception)
{
- ExceptionDlg.Show(this.Text, exception);
+ MessageBox.Show(Text + ": " + exception.Message);
}
}
diff --git a/SampleApplications/Samples/GDSClient/Opc.Ua.GdsClient.Config.xml b/SampleApplications/Samples/GDSClient/Opc.Ua.GdsClient.Config.xml
index 35d6d76e0c..5aeecc24a2 100644
--- a/SampleApplications/Samples/GDSClient/Opc.Ua.GdsClient.Config.xml
+++ b/SampleApplications/Samples/GDSClient/Opc.Ua.GdsClient.Config.xml
@@ -58,6 +58,24 @@
%CommonApplicationData%\OPC Foundation\GDS\PKI\temporary
+
+
+
+ https://login.microsoftonline.com/opcfoundationprototyping.onmicrosoft.com
+ authorization_code
+ f8b31779-d9a3-43ff-b854-28f27a52e2f2
+ https://localhost:62540/prototypeclient
+ /oauth2/token
+ /oauth2/authorize
+
+
+ urn:localhost:somecompany.com:GlobalDiscoveryServer
+ https://localhost:62540/prototypeserver
+
+
+
+
+
diff --git a/SampleApplications/Samples/GDSClient/Program.cs b/SampleApplications/Samples/GDSClient/Program.cs
index b008f10d60..ae85cc8f3a 100644
--- a/SampleApplications/Samples/GDSClient/Program.cs
+++ b/SampleApplications/Samples/GDSClient/Program.cs
@@ -1,10 +1,6 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Windows.Forms;
-using Opc.Ua;
using Opc.Ua.Configuration;
-using Cannoli.Services;
namespace Opc.Ua.GdsClient
{
@@ -16,10 +12,13 @@ namespace Opc.Ua.GdsClient
[STAThread]
static void Main()
{
+ // Initialize the user interface.
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- ApplicationInstance application = new ApplicationInstance(ApplicationType.Client);
+ ApplicationInstance application = new ApplicationInstance();
+ application.ApplicationType = ApplicationType.Client;
+ application.ConfigSectionName = "Opc.Ua.GdsClient";
try
{
@@ -34,8 +33,7 @@ namespace Opc.Ua.GdsClient
}
catch (Exception e)
{
- ExceptionDlg.Show(application.ApplicationName, e);
- return;
+ MessageBox.Show(application.ApplicationName + ": " + e.Message);
}
}
}
diff --git a/SampleApplications/Samples/GDSClient/packages.config b/SampleApplications/Samples/GDSClient/packages.config
new file mode 100644
index 0000000000..2184631ea5
--- /dev/null
+++ b/SampleApplications/Samples/GDSClient/packages.config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file