1

I would like to create an opc ua client using blazor webassembly. Has anyone done this before?

I tried to create a project starting from this example: https://github.com/OPCFoundation/UA-.NETStandard/blob/master/Applications/ConsoleReferenceClient/Program.cs

but when I perform the application.LoadApplicationConfiguration(silent: false); I get an error: System.Security.Cryptography.X509Certificates is not supported on this platform.

Maybe I need to configure the client to connect differently? maybe without using the certificate?

thanks

Giuseppe
  • 21
  • 2

1 Answers1

0

Blazor webassembly cannot connect to a OPC ua server directly since the code is executed in the browser. You need to make a serverside API or something like this to get the data from an OPC ua server.

If you don't mind changing you can use blazor serverside, this can connect to your OPC ua server without making an API.

https://www.pragimtech.com/blog/blazor-webAssembly/what-is-blazor-webassembly/

Furthermore I made small tutorial on how to connect to an OPC ua server and get a node value using OPC foundation .net SDK in this post: Opc ua tutorial

This doesn't include credentials or certificates. So if you need this read the documentation carefully since this is quite hard to understand.

Victor Pieper
  • 540
  • 2
  • 17