Commit Graph

13 Commits

Author SHA1 Message Date
Martin Regen 4c0880c800 Fix codesmells. No functional changes and bug fixes. (#2368)
Fix many warnings to improve code quality or simplify the code.
2023-11-07 10:34:42 +01:00
Martin Regen e6f3004d6e Improve client subscription implementation (#2245)
- shutdown the worker tasks with a ManualResetEvent instead of timer null check
- Breaking change: Decorate the PublishStateChanged event handler with state information:
- - Stopped/Recovered if publish times out/restarts
- Breaking change: PublishStateChange fired for every received publish response, which doesn`t really indicate a state change. 
-- new behavior: fires only if a Keep alive or republish is triggered.
2023-08-04 10:17:38 +02:00
Martin Regen 043a56c3f2 Deprecate .NET framework 4.6.2 support, sync with samples repo (#2165)
- Deprecate support for Nuget package support of .NET Framework 4.6.2
- Bump sample applications to 4.8
- update some copyright headers / supporting files (editorconfig etc.)
- fix a few warnings
- fix an issue with `SessionReconnectHandler`, in certain combination of reconnect period and exponential backoff the .NET sample app never reconnected.
2023-05-31 18:53:56 +02:00
Martin Regen da1b1a7112 Add Session.CloseAsync, fix UANodesetHelper.Save (#1944)
-Add Session.CloseAsync methods.
-Add missing Close signatures to ISession
-Mark the CloseSession service call as obsolete to prevent invalid usage
-fix UANodeSetHelper.Save(stream), to not close the stream
-fix a deadlock in the ref server app, due to the new default behavior of the cert validator not caching the approved certificates
2022-10-11 11:03:00 +02:00
Ivan van Heerden 1f2a30d7ca Add abstraction 'ISession' for Session object in the Client library (#1702)
Expose an 'ISession' interface as abstraction to ease unit testing. 

Breaking changes are kept to minimal impact, but some changes maybe required to use ISession objects instead of Session.

Note: ISessionClientMethods is hand created, not yet by ModelCompiler
2022-10-07 20:11:53 +02:00
Martin Regen f273634d74 Improve https transport and other bug fixes (#1908)
-Make the https callbacks fully async / code cleanup. 
-Default https client to use MaxConnectionsToServer = 64 for #1550
-Fix https missing reconnect error code
other fixes unrelated to https:
- move trust list audit event to AuditEvents.cs, fix issue that the event is not filtered since reportAuditEvent cannot be used
- fix an issue when BrowseNext for multiple continuation tokens doesn't add the results array properly
- bump up .NET Core 3.1 Nuget dependencies
- improve .NET reference client app for use with https
2022-08-20 23:44:09 +02:00
Martin Regen fd9a91afe7 Fix issues with reconnect handler and subscription transfer (#1802)
- set `KeepAliveTimeout` default back to 5s, was unintentionally set to 50s in 368 release
- fix a bug that duplicate subscriptions were created after reconnect when transfer succeeds.
- add a property to enable subscription transfer in reconnect, set `Session.TransferSubscriptionsOnReconnect=true` to enable, IOP issues may not allow to use it with some servers.
- add a `SessionReconnectHandler(true)` constructor to support reconnect abort, if the connection recovers before reconnect timer called. If the new constructor is used, its a breaking change: Needs check of  `Session` property in Reconnect handler callback, if aborted `Session==null`.
- Reduce warning log output if server timestamp > client time.
- Add handling when subscriptions can not be transferred, e.g. when false user credentials or no security prevent transfer.
- Improve the reconnect timer handling by using `OperationLimit` in reconnect.
- Add sample for `SessionReconnectHandler` in console client.
- Seperate session sample code from `UAClient`.
- Tested on popular demo servers of various SDK vendors.
- Fix Winforms ref client
2022-05-11 22:28:07 +02:00
Martin Regen a147eb55c5 Tracing and Logging improvements for the UA Core and libraries (#1631)
- support for Microsoft.Extensions.Logger.ILogger in Opc.Ua.Core as the new logging interface
- backward compatible with config and TraceEvents
- new API Utils.SetLogger allows to set ILogger
- updated Console samples to demonstrate ILogger support with Serilog
- support for EventSource logging
- see Docs/Logging.md for more info
2021-12-16 00:20:08 +01:00
Martin Regen 53ec78f1bc IOP workshop 2021 fixes and build improvements (#1562)
-fixes for complex types:
  - a structure which contains an enum from namespace 0 can not be created. fixes #1561.
  - a structure with multidimensional array may lead to a endless loop in `ComplexTypeSystem.Load`
  - a malformed namespace Uri which contains a space character prevents creation of type system.
  - select endpoint doesn't pick the right scheme if the default endpoint must be picked
-prep for net472 or greater and net5.0 or greater build, only build #ifdef
2021-10-29 16:21:43 +02:00
Martin Regen 4a14df9cd5 Fix build and LGTM warnings (#1251)
- Fix only build and LGTM warnings
- no bug fixes - - oh wait -- found and fixed root cause for flaky builds, forgotten await when add cert to trusted folder
- remove source files from WinForms libraries which are not used in the projects
2021-01-20 20:18:36 +01:00
Martin Regen 4752a808df Validate server domains in Cert validator (#1226)
- Based on new handling of multiple suppressible errors, add also the domain check to the list
- Move domain check in validator and use cert validation callback to handle BadCertificateInvalidHostname.
- Allow to handle all suppressible errors including the domain check by the cert validator callback, approve all errors by new AcceptAll flag. Applications which only set Approve are called for each of the suppressible errors and must approve eah of them.
- Add approval of multiple errors to sample UI
- fix a few warnings
2021-01-07 09:26:14 +01:00
AlinMoldovean 764c481405 Update Copyright year to 2020 2020-10-07 18:04:34 +03:00
Alin Moldovean 5faf85a7b9 Create Applications folder with ReferenceClient/Server (#1015)
* Clean UA Reference solution

* Move ReferenceClient/Server

* Copy Client/ServerControls libraries
Fix project references

* Rename docs to Docs

* Rename GDS libraries according to naming convention
2020-06-15 09:36:09 +03:00