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.

I can write to an OPC server but not read

More
10 Nov 2019 12:17 #7951 by support
Thank you.

I am also out of ideas.

Best regards

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

More
08 Nov 2019 01:51 #7939 by mikeboiko
I compared the DCOM settings of OpcEnum and the Yokogawa.ExaopcDACS1.1
There were a few differences:
- Change Configuration Parameters was set to Everyone for OpcEnum and only certain users for ExaOpc
- OpcEnum used The system Account in the Identity tab, while ExaOPC used a specific Exa user

Seeing as how these OPC servers are being used in production, I'm not able to play around with these settings.

To tell you the truth, I think I will just keep QuickOPC as the primary library in my application and keep h-opc as a backup library that the user can switch to if problems occur. I'm not sure if there's anything else you can try but we've both spent a lot of time on this already and I'm not sure if we're getting anywhere. The core of the problem still seems to be some sort of DCOM permission settings. I've never experienced this problem with any other OPC servers so I'm hoping it's just a one off case that I won't have to worry about in the future.

Thanks for your time!

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

More
07 Nov 2019 09:58 #7933 by support
Thank you.

The fact that the browsing for server work is most likely an indication that DCOM access to the OpcEnum object on the remote computer works fine (unless the QuickOPC resorted to Remote Registry browsing, but assume for now that it did not).

Can you carefully check the DCOMCNFG setting on the OpcEnum object on the remote computer and compare them against the settings for Yokogawa.ExaopcDACS1.1 on the remote computer, to see if they differ somehow?

Best regards

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

More
06 Nov 2019 14:33 #7923 by mikeboiko
I was successfully able to get a list of OPC servers on STN0459 using the line of code you provided.

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

More
06 Nov 2019 09:33 #7920 by support
OK. Can you please check whether QuickOPC can browse servers on that remote computer? That is, do something like
var elements = client.BrowseServers("STN0459");
(where client is an instance of EasyDAClient)

to see if that throws an exception as well, or returns a list of servers.

Thank you

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

More
05 Nov 2019 15:40 #7916 by mikeboiko
Yes, that is correct.

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

More
05 Nov 2019 12:28 #7914 by support
Thank you.

Just to verify the current situation:
- With QuickOPC, you always get "Access is denied" - no matter whether you do Read, Write, or Subscribe.
- With Hylasoft, you can successfully read and write, but you receive "Access is denied" when you try to subscribe.

is that correct?
Regards

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

More
04 Nov 2019 18:48 - 05 Nov 2019 12:24 #7911 by mikeboiko
Hi,
I compiled my app 6 times with the following variations but the problem still existed:
            EasyDAClient.SharedParameters.Client.UseCustomSecurity = true;
            EasyDAClient.SharedParameters.Client.TurnOffActivationSecurity = true;
            EasyDAClient.SharedParameters.Client.TurnOffCallSecurity = true;
            EasyDAClient.SharedParameters.Client.UseCustomSecurity = false;
            EasyDAClient.SharedParameters.Client.TurnOffActivationSecurity = false;
            EasyDAClient.SharedParameters.Client.TurnOffCallSecurity = false;
I only ever tried one of these settings at a time. The whole time I had async calls disabled too.

FYI, you could compare the code of h-opc to see what is different from your code. The following C# console application allows me to read and write successfully:
using Hylasoft.Opc.Da;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace HopcTest
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var client = new DaClient(new Uri("opcda://STN0459/Yokogawa.ExaopcDACS1.1")))
            {
                client.Connect();
                var tag = "FCS0317!202PC01093B.MODE";
                client.Write(tag, "MAN"); // Write Value
                var val = client.Read<o-bject>(tag).Value; // Read Value
                Console.WriteLine(val);
            }
        }
    }
}


Thanks,
Mike
Last edit: 05 Nov 2019 12:24 by support.

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

More
23 Oct 2019 13:11 #7856 by support
Hello,

I got mislead because in your very original report, you wrote "During some read operations, I would simply get the "Access is denied." error." - but I suppose that after making some of the changes, this has turned to be a permanent thing (which, I think, is actually good, in a way).

I think the issue is most likely in the DCOM configuration (on the computers, and/or inside QuickOPC parameters - more about it later). The subscriptions needs the server to call back into the client (same as with Async reads or writes), and it is actually a common issue that DCOM is configured to allow the one way (from client to server) but not the other way (from server to client). It's weird, though, that disabling the Async methods (I suppose you still have that line in your code) does not help. But the issue with HylaSoft shows that there is "something".

I'd like to ask you to experiment with DCOM settings that are inside QuickOPC (while keeping the async methods disabled). It is described here: www.opclabs.com/forum/connections-reconnections-com-dcom/124...ng-to-remote-machines-via-code . There are, in total, I think 6 combinations. Note that they must be tried individually (in separate runs of the program) - they influence per-process settings that are not reversible. The names of some properties have changed over the history of versions (e.g. ClientParameters vs. Client), but I suppose you'll find out which of the two applies to your version.

Best regards

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

More
19 Oct 2019 22:04 #7847 by mikeboiko
Hi,

I do believe it is a security problem, but it is a very strange one. The problem is consistent. If I were to do 100 reads with QuickOPC, I would get 100 "Access is Denied" errors. It happens consistently every time.

I mentioned to you that I am able to successfully read using some other OPC clients. I recently discovered something interesting while testing this client: github.com/hylasoft-usa/h-opc

I was able to write successfully. I was able to read successfully. However, when I tried to subscribe, I got an Access is Denied error. As far as I can tell, I'm doing a full read operation (value, quality and timestamp). Not sure why the permissions would be different for reading and subscribing. Anyways, I just thought I'd share this clue in case it gave you any other ideas.

Thanks,
Mike

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

Moderators: support
Time to create page: 0.080 seconds