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.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Reading, Writing, Subscriptions, Property Access
- I can write to an OPC server but not read
I can write to an OPC server but not read
I am also out of ideas.
Best regards
Please Log in or Create an account to join the conversation.
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.
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.
Please Log in or Create an account to join the conversation.
var elements = client.BrowseServers("STN0459");
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.
Please Log in or Create an account to join the conversation.
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.
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;
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
Please Log in or Create an account to join the conversation.
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.
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.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Reading, Writing, Subscriptions, Property Access
- I can write to an OPC server but not read