- Posts: 7
- Thank you received: 0
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.
BrowseServers
{
EasyDAClient client = new EasyDAClient();
try
{
foreach (OpcLabs.EasyOpc.ServerElement se in client.BrowseServers(serverName))
{
System.Diagnostics.Debug.Print("{0}", se.Description);
}
}
catch { System.Diagnostics.Debug.Print("

}
if I use an EasyAEClient I get a value returned, but the DA one just never returns. Debugger is set to break on any thrown exception. (Have tried IP address and machineName)
Thanks
Please Log in or Create an account to join the conversation.
Can you please post here the piece of code relevant to your BrowseServers call, including error handling?
Also, sometimes there are first-chance exceptions that are of interest - don't they appear in the debugger Output window, or can you set the debugger option to break immediately when any exception is thrown?
Thank you
Please Log in or Create an account to join the conversation.
2 easyDAClient1.ReadItem throws{System.UnauthorizedAccessException: Access is denied. }
3 For browsing I have tried the following to list the opc DA servers on the remote machine
This fails
Guid CLSID_OPCEnum = typeof(OpcRcw.Comn.IOPCEnumGUID).GUID ;
Type typeFromCLSID = Type.GetTypeFromCLSID(CLSID_OPCEnum, ipAddress,true);
iServerList = (OpcRcw.Comn.IOPCServerList2)Activator.CreateInstance(typeFromCLSID);
This works
typeFromCLSID = Type.GetTypeFromCLSIDnew Guid("{13486D51-4821-11D2-A494-3CB306C10000}"), ipAddressOrMachineName);
iServerList = (OpcRcw.Comn.IOPCServerList2)Activator.CreateInstance(typeFromCLSID);
This works
OpcRcw.ServerEnumerator se = new OpcRcw.ServerEnumerator();
se.Connect(ipAddressOrMachineName, "", "", "");
foreach (OpcRcw.ServerDescription d in se.GetAvailableServers(new Guid[] { typeof(CATID_OPCDAServer10).GUID, typeof(CATID_OPCDAServer20).GUID, typeof(CATID_OPCDAServer30).GUID }))
{
System.Diagnostics.Debug.Print("{0} ClassId:{1} ProgId{2} {3}",d.Description ,d.Clsid,d.ProgId,d.GetType().Name);
}
se.Disconnect();
Thanks
Please Log in or Create an account to join the conversation.
- What kind of project are you making (e.g. desktop app, Web app, Web service, Windows service, ...)?
- How do other kinds of operations behave (ReadXXXX, WriteXXXX)?
- Have you tried other OPC client from the same computer, and what were the results?
Thank you
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The current code in the BrowseServers is less resilient against hangs than that for data operations, such as ReadXXXX or WriteXXXX. It does not run the actual browsing method on a separate thread and thus it cannot enforce its own timeout on top of it.
From what you describe, the call might be blocked inside the DCOM. How long have you waited? What happens if you wait more than 6 minutes - does it return then?
Thank you
Please Log in or Create an account to join the conversation.
DCOM is not set up so I would expect the function call to return / throw an exception rather than hang. However OPCEnum service is running on the remote machine.
Please Log in or Create an account to join the conversation.