I use OPCAutomation in ASP.NET MVC.

If you start the site from a laptop, then everything is fine - it connects to the server, a group is created, tags are added.

But if you deploy a site on the IIS server (Windows Server 2008 R2 Standart), then the tags stop being added

Group.OPCItems.AddItems(count, ref tagnames, ref cHandles, out sHandles, out errors); 

The errors output will contain the code -1073479672, which means:

The item ID does not conform to the server's syntax

How to fix it?

  • 1) in vain removed the code, one line is difficult to judge about the problem 2) check the name of the variable (it hasn't worked with opc for a long time, but the error text seems to hint at this) - Vasek
  • The code is just for the view, the problem is not in it, because it works on a laptop. In the SMC logs I found "Unable to add item '...' with access path (null)" I suppose the problem is in the server itself, but at the same time: @ Start the site from the laptop, connect to the server >> OK @ Start the site directly from Server >> Error - Essle Jaxcate
  • If I understand correctly, then you have an asp position in which you are trying to connect to a local opc server. Based on this, I would first try to localize the problem, namely ... 1) Try a reliable opc server. For example, a test from the matrix 2) Try to test your code in a console application 3) Try to write native code (c ++ or delphi) without using any libraries. - Vasek

1 answer 1

I solved the problem. In ArchestrA SMC the name opcgroup was incorrectly indicated.