Login  •  Register


UaApplicationConfiguration for web config

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

UaApplicationConfiguration for web config

Postby sanjayguptaengg007 » 03 Jul 2019, 08:08

Hi ALl ,

I am developing one web application and want to use below configuration residing in web config but I am not able to get these configuration in Session object of UnifiedAutomation.UaClient.dll
it is working with app.config . please suggest how to use in web config.
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="UaApplicationConfiguration" type="UnifiedAutomation.UaBase.ApplicationConfigurationSection,UnifiedAutomation.UaBase"/>
</configSections>

<UaApplicationConfiguration>
<SecuredApplication xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://opcfoundation.org/UA/2011/03/SecuredApplication.xsd">

<!-- Identify the Application -->
<ApplicationName>UnifiedAutomation GettingStartedClient</ApplicationName>
<ApplicationUri>urn:localhost:UnifiedAutomation:GettingStartedClient</ApplicationUri>
<ApplicationType>Server_0</ApplicationType>
<ProductName>UnifiedAutomation GettingStartedClient</ProductName>

<!-- Specify location of Certificates and Trust Lists -->
<ApplicationCertificate>
<StoreType>Directory</StoreType>
<StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiclient\own</StorePath>
<!--
<StoreType>Windows</StoreType>
<StorePath>LocalMachine\My</StorePath>
-->
<SubjectName>CN=GettingStartedClient/O=UnifiedAutomation/DC=localhost</SubjectName>
<ValidationOptions>0</ValidationOptions>
</ApplicationCertificate>
<TrustedCertificateStore>
<StoreType>Directory</StoreType>
<StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiclient\trusted</StorePath>
<!--
<StoreType>Windows</StoreType>
<StorePath>LocalMachine\UA Applications</StorePath>
-->
<ValidationOptions>0</ValidationOptions>
</TrustedCertificateStore>
<IssuerCertificateStore>
<StoreType>Directory</StoreType>
<StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiclient\issuers</StorePath>
<!--
<StoreType>Windows</StoreType>
<StorePath>LocalMachine\UA Certificate Authorities</StorePath>
-->
<ValidationOptions>0</ValidationOptions>
</IssuerCertificateStore>
<RejectedCertificatesStore>
<StoreType>Directory</StoreType>
<StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiclient\rejected</StorePath>
<ValidationOptions>0</ValidationOptions>
</RejectedCertificatesStore>

<Extensions>

<!-- Specify the Trace Settings for the Application -->
<Extension>
<TraceSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd" MasterTraceEnabled="false" DefaultTraceLevel="Info">
<TraceFile>%CommonApplicationData%\unifiedautomation\logs\UaSdkNetBundleEval\GettingStartedClient.log.txt</TraceFile>
<MaxEntriesPerLog>100000</MaxEntriesPerLog>
<MaxLogFileBackups>3</MaxLogFileBackups>
<FastTrace>false</FastTrace>
<ModuleSettings>
<ModuleTraceSettings ModuleName="UnifiedAutomation.Stack"/>
<ModuleTraceSettings ModuleName="UnifiedAutomation.Client"/>
</ModuleSettings>
</TraceSettings>
</Extension>

<Extension>
<ClientSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
<ProductUri>urn:UnifiedAutomation:GettingStartedClient</ProductUri>
</ClientSettings>
</Extension>

<!-- Specify Settings when EXE is run with the /install argument -->
<Extension>
<InstallationSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
<GenerateCertificateIfNone>true</GenerateCertificateIfNone>
<!-- Supported values are 1024, 2048, 3072 and 4096. Default is 2048. -->
<CertificateKeyLength>2048</CertificateKeyLength>
<!-- Possible values are sha1 and sha256. Default is sha256. -->
<CertificateHashAlgorithm>sha256</CertificateHashAlgorithm>
<DeleteCertificateOnUninstall>true</DeleteCertificateOnUninstall>
</InstallationSettings>
</Extension>

</Extensions>

</SecuredApplication>
</UaApplicationConfiguration>

<!--
<system.serviceModel>
<diagnostics>
<messageLogging logEntireMessage="true" maxMessagesToLog="3000" logMessagesAtServiceLevel="true" logMalformedMessages="true" logMessagesAtTransportLevel="true"/>
</diagnostics>
</system.serviceModel>

<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Verbose, ActivityTracing">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default"/>
<add name="ServiceModel Listener"/>
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default"/>
<add name="ServiceModel Listener"/>
</listeners>
</source>
</sources>
<sharedListeners>
<add initializeData="VendorQuickstart.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="ServiceModel Listener" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack"/>
</sharedListeners>
</system.diagnostics>
-->
</configuration>
sanjayguptaengg007
Newbie
Newbie
 
Posts: 1
Joined: 03 Jul 2019, 07:40

Return to .NET based OPC UA SDK

Who is online

Users browsing this forum: No registered users and 0 guests