Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Error: Access is denied. + The client methods called (or event/callback invoked)

More
22 Jun 2021 10:53 #9808 by support
Hello,

I have difficulty believing that now the correct (newer) version of the QuickOpc assemblies is being used. The appsettings.json is being ignored, and that's why the behavior is as in the original problem report.

When there was a crash with appsettings.json, that had indicated that the newer version of the assemblies are being used - and I could have tried to resolve the (likely) versioning problem with lower-level assemblies. But that makes no sense doing now, because that problem ("crash with appsettings.json") is gone.

Regards

Please Log in or Create an account to join the conversation.

More
20 Jun 2021 13:47 #9798 by micham
Hi,
The appsettings.json is really present.

See the error below.

Exceptions

Type: OpcLabs.BaseLib.Browsing.BrowseException
Data:
HelpLink:
HResult: -2146233088 (0x80131500)
InnerException:
System.UnauthorizedAccessException: Access is denied.
+ The client method called (or event/callback invoked) was 'BrowseNodes'.
Data:
OpcLabs.EasyOpc.Implementation.ErrorEnhancement.Processed: True
OpcLabs.EasyOpc.Implementation.DAErrorEnhancement.Processed: True
HelpLink:
HResult: -2147024891 (0x80070005)
InnerException:
Message:
Access is denied.
+ The client method called (or event/callback invoked) was 'BrowseNodes'.
Source: OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient
StackTrace:
TargetSite:
Message: Problem browsing OPC Data Access (OPC-DA) branches.
Source:
StackTrace:
TargetSite:


See also the attached screen capture.

Thank you.

Michael
Attachments:

Please Log in or Create an account to join the conversation.

More
18 Jun 2021 13:56 #9794 by support
Thanks for update.

Please check if the appsettings.json is really present then.
And, if you get the "access is denied", even though it might look similar to before, please send a screenshop again, and also press "..." next to it and copy/report all error information there.

Best regards

Please Log in or Create an account to join the conversation.

More
18 Jun 2021 13:36 #9792 by micham
Hi,

I didn't get the total crash again on my computer. My customer says that the browsing issue (access denied) wasn't solve using the appsetting.json file and the new version.
I shall connect to his computer on Sunday and send you more information.

Thank you.

Michael

Please Log in or Create an account to join the conversation.

More
18 Jun 2021 06:04 #9790 by support
Hello,
thanks for update.

Can you please confirm, that after the restart, and with appsettings.json, not only the "full crash" goes away, but also the original problem ("Access is denied") also appears to be resolved?

Best regards

Please Log in or Create an account to join the conversation.

More
18 Jun 2021 05:46 #9789 by micham
Hi,

I have tried it again after system restart and it didn't happen. I shall continue testing it and let you know if the problem returns.

Here is the link of the setup program.

spaces.hightail.com/receive/Nr4A9TxsSG

You need to run the UCME-Configuration program after the installation. The BIN folder of this product is: C:\Program Files (x86)\Control-See\UCME-OPC\BIN
The appsettings.json file can be found in C:\Program Files (x86)\Control-See\UCME-OPC\Samples. You can copy it to the BIN folder.

Thank you.

Michael

Please Log in or Create an account to join the conversation.

More
17 Jun 2021 07:57 #9772 by support
Hello,
this is weird. I have tested this with an application that should be similar in principle to yours (the Windows Forms demo app), and it works OK for me.

The FileLoadException, according to Microsoft (docs.microsoft.com/en-us/dotnet/api/system.io.fileloadexception?view=netframework-4.7 ), happens when "a Assembly file is found but cannot be loaded.". I do not know which assembly it is referring to, but for now I assume it is one of the Microsoft low-level assemblies, and I suspect it may be a versioning problem among those.

Can you provide me with your installation package having this latest state of QuickOPC, or (if that's sufficient to run it) a zip file of your product as deployed on the target system? I would then compare the assemblies deployed, and possibly tinker with their version, to see if the cause can be identified and th eproblem resolved.

Best regards

Please Log in or Create an account to join the conversation.

More
16 Jun 2021 18:28 #9765 by micham
Hi,
I have installed QuickOPC version 5.61.241.1 and redeployed and rebuilt with it.
When I place the appsettings.json file (see attached zip file) in the same folder where the application EXE file is, the application doesn't load with no error message.
In the Event viewer I see the following errors.

If I delete the appsettings.json file, the application is loaded with no problem.

Application: UCMECFG.EXE
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileLoadException
at System.ReadOnlyMemory`1[[System.Char, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Span()
at System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1<Char>, System.Text.Json.JsonDocumentOptions)
at System.Text.Json.JsonDocument.Parse(System.String, System.Text.Json.JsonDocumentOptions)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.ParseStream(System.IO.Stream)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(System.IO.Stream)
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean)
at Microsoft.Extensions.Configuration.FileConfigurationProvider.HandleException(System.Runtime.ExceptionServices.ExceptionDispatchInfo)
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean)
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load()
at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(System.Collections.Generic.IList`1<Microsoft.Extensions.Configuration.IConfigurationProvider>)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at OpcLabs.BaseLib.Extensions.Hosting.StaticHost.CreateHost()
at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue()
at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].LazyInitValue()
at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Value()
at OpcLabs.BaseLib.Extensions.Hosting.StaticHost.GetConfiguration()
at OpcLabs.EasyOpc.DataAccess.Forms.Browsing.DADialog..cctor()

Exception Info: System.TypeInitializationException
at OpcLabs.EasyOpc.DataAccess.Forms.Browsing.DADialog..ctor()
at OpcLabs.EasyOpc.DataAccess.Forms.Browsing.DAItemDialog..ctor(System.ComponentModel.IContainer)
at UCMECFG.Form1.InitializeComponent()
at UCMECFG.Form1..ctor()

Exception Info: System.InvalidOperationException
at UCMECFG.My.MyProject+MyForms.Create__Instance__[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon)
at UCMECFG.My.MyApplication.OnCreateMainForm()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
at UCMECFG.My.MyApplication.Main(System.String[])


Application: UCMECFG.EXE Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileLoadException at System.ReadOnlyMemory`1[[System.Char, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Span() at System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1<Char>, System.Text.Json.JsonDocumentOptions) at System.Text.Json.JsonDocument.Parse(System.String, System.Text.Json.JsonDocumentOptions) at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.ParseStream(System.IO.Stream) at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(System.IO.Stream) at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean) at Microsoft.Extensions.Configuration.FileConfigurationProvider.HandleException(System.Runtime.ExceptionServices.ExceptionDispatchInfo) at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean) at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load() at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(System.Collections.Generic.IList`1<Microsoft.Extensions.Configuration.IConfigurationProvider>) at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build() at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration() at Microsoft.Extensions.Hosting.HostBuilder.Build() at OpcLabs.BaseLib.Extensions.Hosting.StaticHost.CreateHost() at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue() at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].LazyInitValue() at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Value() at OpcLabs.BaseLib.Extensions.Hosting.StaticHost.GetConfiguration() at OpcLabs.EasyOpc.DataAccess.Forms.Browsing.DADialog..cctor() Exception Info: System.TypeInitializationException at OpcLabs.EasyOpc.DataAccess.Forms.Browsing.DADialog..ctor() at OpcLabs.EasyOpc.DataAccess.Forms.Browsing.DAItemDialog..ctor(System.ComponentModel.IContainer) at UCMECFG.Form1.InitializeComponent() at UCMECFG.Form1..ctor() Exception Info: System.InvalidOperationException at UCMECFG.My.MyProject+MyForms.Create__Instance__[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon) at UCMECFG.My.MyApplication.OnCreateMainForm() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[]) at UCMECFG.My.MyApplication.Main(System.String[])


UCMECFG.EXE
2020.270.0.0
60ca0716
KERNELBASE.dll
10.0.16299.611
966d0f68
e0434352
00104172
4b4
01d762dc2f1cfa44
C:\Program Files (x86)\Control-See\UCME-OPC\BIN\UCMECFG.EXE
C:\WINDOWS\System32\KERNELBASE.dll
5408fe76-fbe7-4f60-b0ce-155677647835


Any idea what to do?

Thank you.

Michael
Attachments:

Please Log in or Create an account to join the conversation.

More
01 Jun 2021 12:18 #9717 by support
Hello.

Unfortunately, it turned out that the settings I have recommended do not apply to the EasyDAClient object that is used "inside" the item browsing dialog (or other OPC DA dialogs). That's why the change you have made had no effect. My fault.

In order to resolve it, two things need to done:

1. Update to QuickOPC 5.60.222.1 or later (& rebuild, redeploy with it). This version is now on our main download page - www.opclabs.com/products/quickopc/downloads .

2. Use an enhanced appsettings.json (below, and attached - zipped).
{
  "OpcLabs.EasyOpc.DataAccess.EasyDAClient": {
    "InstanceParameters": {
      "EnableNativeClient": false,
      "EnableNetApiClient": true
    }
  },
 
  "OpcLabs.EasyOpc.DataAccess.Forms.Browsing.DADialog": {
    "ClientSelector": {
      "InstanceParameters": {
        "EnableNativeClient": false,
        "EnableNetApiClient": true
      }
    }
  }
}

File Attachment:

File Name: Appsetting...nt-2.zip
File Size:0 KB


Best regards
Attachments:

Please Log in or Create an account to join the conversation.

More
01 Jun 2021 08:26 #9716 by support
Working on it. There is an issue on our side. Will let you know.

Best regards

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.079 seconds