Reference
IOpcApplicationInstance Members
Defines a concrete application of one of the possible OPC UA application types available.
Reference
IOpcApplicationInstance Members
- Type
- IOpcApplicationInstance
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Properties
ApplicationName
Gets or sets the name of the application instance.
string ApplicationName { get; set; }Property ApplicationName As StringProperty value
The name of the application. The default value is "OPC Application" in case there is no entry assembly available; otherwise the value of the AssemblyTitleAttribute of the entry assembly.
Remarks
The name does not have to be unique. The value of this property is also used as the SubjectName of the application certificate whenever an application certificate is to be created/looked-up (from the application certificates store).
ApplicationState
Gets the current state of the application instance.
OpcApplicationState ApplicationState { get; }ReadOnly Property ApplicationState As OpcApplicationStateProperty value
One of the members defined by the OpcApplicationState enumeration.
ApplicationType
Gets the type of application the instance represents.
OpcApplicationType ApplicationType { get; }ReadOnly Property ApplicationType As OpcApplicationTypeProperty value
One of the members defined by the OpcApplicationType enumeration. Each member identifies a specific type of OPC UA application and its usage within the OPC UA environment.
ApplicationUri
Gets or sets the URI of the application instance.
Uri ApplicationUri { get; set; }Property ApplicationUri As UriProperty value
The Uri or a null reference (Nothing in Visual Basic) which uniquely identifies the application instance.
Remarks
In case there the value of this property is a null reference (Nothing in Visual Basic) the URI of the application is determined by the subject alternate name of the application certificate used. In case there an application certificate is to be created, this value is used to define the certificates subject alternate name.
Certificate
Gets or sets the application certificate representing the applications identity.
X509Certificate2 Certificate { get; set; }Property Certificate As X509Certificate2Property value
An instance of the X509Certificate2 class used to identify the application instance.
CertificateStores
Gets the OpcCertificateStores instance used to maintain the different certificate stores used by the application instance.
OpcCertificateStores CertificateStores { get; }ReadOnly Property CertificateStores As OpcCertificateStoresProperty value
An instance of the OpcCertificateStores class used by the instance to setup and maintain the certificate stores and their certificates used by the application instance.
Configuration
Gets or sets an instance of the OpcApplicationConfiguration class which is used as a low-level representation of the code/file based application instance configuration.
OpcApplicationConfiguration Configuration { get; set; }Property Configuration As OpcApplicationConfigurationProperty value
An instance of the OpcApplicationConfiguration class configured with the instance specific setup to use. An assignment of a null reference (Nothing in Visual Basic) will lead to the creation of a new instance of the OpcApplicationConfiguration class with all defaults typically used by the type of application instance.
Namespaces
Gets a read-only collection of namespaces used by the application instance.
OpcReadOnlyNamespaceCollection Namespaces { get; }ReadOnly Property Namespaces As OpcReadOnlyNamespaceCollectionProperty value
OpcReadOnlyNamespaceCollection
An instance of the OpcReadOnlyNamespaceCollection class with OpcNamespace items for each 'NamespaceUri' known/used.
ProductUri
Gets or sets the URI of the product.
Uri ProductUri { get; set; }Property ProductUri As UriProperty value
The Uri or a null reference (Nothing in Visual Basic) which uniquely identifies the product.
Remarks
In case there the value of this property is a null reference (Nothing in Visual Basic) the URI of the product is determined by the AssemblyCompanyAttribute and AssemblyProductAttribute used.
Security
Gets the OpcSecurity instance used to maintain the different security options used by the application instance.
OpcSecurity Security { get; }ReadOnly Property Security As OpcSecurityProperty value
An instance of the OpcSecurity class used by the IOpcApplicationInstance to setup and maintain the different security options.
SystemContext
Gets the OpcContext which is used to store the context sensitive data and configuration used by the current application instance.
OpcContext SystemContext { get; }ReadOnly Property SystemContext As OpcContextProperty value
An instance of the OpcContext class which might be at least Empty.
Transport
Gets the OpcTransport instance used to maintain the different transport options used by the application instance.
OpcTransport Transport { get; }ReadOnly Property Transport As OpcTransportProperty value
An instance of the OpcTransport class used by the IOpcApplicationInstance to setup and maintain the different transport options.
Methods
QueryCertificate
Requests the certificate to use for this application instance in case there the certificate could not automatically determined using the information of this application instance or there are any issues with the Certificate.
X509Certificate2 QueryCertificate(OpcCertificateValidationResult reason)Function QueryCertificate(
reason As OpcCertificateValidationResult) As X509Certificate2Parameters
| Name | Type | Description |
|---|---|---|
reason | Opc | One of the members defined by the Opc |
Returns
An instance of the X509Certificate2 class indicating the application instance certificate to use or a null reference (Nothing in Visual Basic) in case there the framework shall create a new certificate by its own using the application information of this instance.
Events
CertificateRequested
Occurs when the certificate of this application instance could not automatically determined using the information of this IOpcApplicationInstance. This event is when used to query the certificate to use for the application instance. Additionally use this event to determine the case that an appropriate instance certificate is missing and in case there AutoCreateCertificate of CertificateStores is equals true a new certificate is being created automatically after the event has been processed (and this may take some time).
event OpcCertificateRequestedEventHandler CertificateRequestedEvent CertificateRequested As OpcCertificateRequestedEventHandlerEvent type
OpcCertificateRequestedEventHandler
Remarks
The event occurs when a server starts or a client connects, with one of the following Reason values:
- Missing, MissingPrivateKey, InvalidThumbrint, MissingApplicationUri and, for a server, InvalidDomain: the certificate cannot be used. A new certificate is created if AutoCreateCertificate is true and AlternativeCertificate is a null reference (Nothing in Visual Basic). Another certificate provided using AlternativeCertificate is used instead.
- Invalid, UseNotAllowed, Revoked, TimeInvalid, IssuerUseNotAllowed, IssuerRevoked and IssuerTimeInvalid: the certificate exists, but other applications refuse it (e.g. because it has expired). The certificate is never replaced automatically: if AlternativeCertificate is a null reference (Nothing in Visual Basic) or the original certificate, the application keeps using it; another certificate provided using AlternativeCertificate is used instead.
A certificate which is not trusted yet does not raise the event; it is added to the TrustedPeerStore.
CertificateValidationFailed
Occurs when the validation of a opponent application instance certificate does not fulfill the requirements for valid and trusted certificates.
event OpcCertificateValidationFailedEventHandler CertificateValidationFailedEvent CertificateValidationFailed As OpcCertificateValidationFailedEventHandlerEvent type
OpcCertificateValidationFailedEventHandler
Remarks
This event can be used to complement the default validation of opponent application instance certificates. Using the event arguments it is possible to accept the certificate using different/custom circumstances.

