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.

Directory Services

More
07 Jul 2023 08:20 #11887 by shadok
Replied by shadok on topic Directory Services
After install core components from Opc Foundation everythings works. :)

Many Thanks !

Regards
The following user(s) said Thank You: support

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

More
07 Jul 2023 06:17 #11885 by support
Replied by support on topic Directory Services
Many thanks.

I think the problem is basically "solved".
The cause of the crash was the "prerequisite boxing". This is a 3rd party library which we cannot influence, so it has a bug, the only resolution is to disable it.

However, what the "prerequisite boxing", is precisely what it says - it "boxes" the prerequisites for OPC operations into QuickOPC itself. Normally, you would have to install additional software to make OPC work - and the prerequisite boxing is meant to make it easier by not having to do that.

So, without prerequisite boxing, you need to install the prerequisites yourself. Because they are not installed, you are getting the "Interfejs niezarejestrowany." error. You need OPC Core Components from OPC Foundation.

- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ml#Prerequisites%20Boxing.html
- opcfoundation.org/developer-tools/samples-and-tools-classic/core-components/

Best regards

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

More
07 Jul 2023 06:02 #11884 by shadok
Replied by shadok on topic Directory Services
Hi,

After disabling "prerequisite boxing" we have the following situation :
- App no crash,
- DirectoryServices works,
- Calling functions from OPCLabs :

WORKS
var serversCom = _opcClient.BrowseServers("", OpcTechnologies.Com);

NOT WORKS
var nodeElementCollection = _opcClient.BrowseNodes(_serverDescriptor, parentNodeDescriptor, new DABrowseParameters());

Exeption :
An OPC operation failure with error ID 'HResult=0x80040155' occurred, originating from '' and with depth of 1. The inner exception contains details about the problem.
Innner exeption :
Interfejs niezarejestrowany.
Nie można znaleźć rejestracji serwera proxy z identyfikatorem IID: {85C0B427-2893-4CBC-BD78-E5FC5146F08F}.
+ The client method called (or event/callback invoked) was 'BrowseNodes'.

Regarding Directory Services.
We use Active Directory for testing. We have two domains: one real (production) and the other test. We experienced this error in both cases.

Active Directory for test I installed according this :
msftwebcast.com/2019/03/step-by-step-guide-how-to-setup-active.html
On Windows Server 2019 Standard Evaluation : www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019

I also try with www.forumsys.com/2022/05/10/online-ldap-test-server but it looks like this server is inactive.

Regards

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

More
06 Jul 2023 17:22 #11882 by support
Replied by support on topic Directory Services
I have also tried the public LDAP server (see www.forumsys.com/2022/05/10/online-ldap-test-server/ ), that one seems to be running, but I could not get the query right. But if you understand LDAP, maybe you can resolve that for me.

Also, I have a strong suspicion what might be behind this: Please try to disable "prerequisites boxing" - see kb.opclabs.com/How_to_disable_prerequisites_boxing .

Best regards

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

More
06 Jul 2023 14:21 #11881 by support
Replied by support on topic Directory Services
Hello.

I tried to reproduce it, but cannot get past the
ds.FindAll()
call, it throws
System.Runtime.InteropServices.COMException
  HResult=0x8007203A
  Message=The server is not operational.
 
  Source=System.DirectoryServices
  StackTrace:
   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
...

which I think is understandable - I probably need some LDAP server? But I have no knowledge about how to enable that easily - can you help? Or, is there an easier/another way to reproduce the issue?

Regards

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

More
06 Jul 2023 11:51 #11879 by shadok
Replied by shadok on topic Directory Services
The application stops without being able to catch the exception.

Windows event shows (sorry that in polish):

Nazwa aplikacji powodującej błąd: OpcDirectoryServiceTest.exe, wersja: 1.0.0.0, sygnatura czasowa: 0xff085a14
Nazwa modułu powodującego błąd: ntdll.dll, wersja: 10.0.22621.1848, sygnatura czasowa: 0x48d14984
Kod wyjątku: 0xc0000005
Przesunięcie błędu: 0x00000000000a57e6
Identyfikator procesu powodującego błąd: 0x0x4624
Godzina uruchomienia aplikacji powodującej błąd: 0x0x1D9AFFE512F0EA4
Ścieżka aplikacji powodującej błąd: C:\Users\jgierynowicz\Desktop\OpcDirectoryServiceTest\OpcDirectoryServiceTest.exe
Ścieżka modułu powodującego błąd: C:\WINDOWS\SYSTEM32\ntdll.dll
Identyfikator raportu: 22aa7971-7403-49e6-b5bc-ec8f599669f2
Pełna nazwa pakietu powodującego błąd:
Identyfikator aplikacji względem pakietu powodującego błąd:

WinDbg also shows that is samothing wrong in ntdll :

(239c.2f28): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
ntdll!memcpy+0x26:
00007ffc`8e4557e6 0f1002 movups xmm0,xmmword ptr [rdx] ds:00000000`00000000=????????????????????????????????

Regards

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

More
06 Jul 2023 11:22 #11878 by support
Replied by support on topic Directory Services
Hello,

this is quite interesting. We haven't some across something similar yet. I will try to reproduce it, but before that, please provide details of what you call "crash". Is it an .NET exception? If so, what is the message and the call stack? Or is it something different? In general, what are the actual symptoms?

Best regards.

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

More
06 Jul 2023 10:41 #11877 by shadok
Directory Services was created by shadok
Hi,

We have WCF application in which are using functions from EasyDaClient. Beside this from this service also quering Directory Services.

The problem is as follows :
After start application, if the any function from EasyDaClient (e.g BrowseServers) is used first and then is a query to DirectoryService we got app crash.

If the order is reversed (used function from System.DirectoryServices first), further operation of the application will proceed without problems.

This problem can also be reproduced in WinForms (e.g. in EasyOpcNetDemo) by inserting the code snippet below :
private void GetDirectoryServiceUsers()
        {
            try
            {
                using (var root = new DirectoryEntry("LDAP://192.168.0.1:389/OU=DBR,OU=workers,DC=company,DC=local"))
                {
                    using (var ds = new DirectorySearcher(root))
                    {
                        ds.PropertiesToLoad.AddRange(new[]
                        {
                            "objectguid",
                            "samaccountname",
                            "name",
                        });
 
                        ds.Filter = "(sAMAccountType=805306368)";
                        ds.SearchScope = SearchScope.OneLevel;
 
                        using (var results = ds.FindAll())
                        {
                            foreach (SearchResult result in results) // CRASH !!!!!!!!!!!!
                            {
                                if (result?.Properties.PropertyNames == null)
                                    continue;
 
                                Console.WriteLine();
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
 
        }

Problem was noticed for 5.61.241.1 version and also confirmed for QuickOPC-2023.1.

I have no idea if it's a bug is in the OpcLabs libraries, but you may have already come across it.

Thank you for your help in advance.
Regards

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

Moderators: support
Time to create page: 0.072 seconds