I am not sure these changes will affect the security of the web application or not, but since the application is in a closed network environment, I think I don't have to worry about it at this moment.
(This will resolve the second error and no more errors.) Also in the Advanced Settings of the application pool, set Process Model -> Identity to LocalSystem.
KEPServerEX OPC Connectivity Suite 5 Things About Connecting To DeltaV OPC Server October 2012 (5) September 2012 (9). (This will resolve the first error and let the second error show up.)Ģ. I experienced all these peculiarities of the DeltaV OPC in an application where my system sends the data to the client system, which in turn feeds a PI. Set "Enable 32-Bit Applications" to True. Right click on the application pool to select Advanced Settings. Finally, I figured out I need to twist two settings in the IIS7 to make it run properly.ġ. I spent two days to search online and did some try and error. Retrieving the COM class factory for component with CLSID failed due to the following error: 80040154.And here is the second error:Įrror HRESULT E_FAIL has been returned from a call to a COM component.I believed these errors coming from the dll. The above codes were running fine in the VS2008, but when I deployed to IIS7, I encountered some errors. OpcGroupNames.SyncWrite(6, ref ItemServerHandles, ref ItemServerValues, out ItemServerValues.SetValue("Test Op 3", 6) ItemServerValues.SetValue("Test Op 2", 5) ItemServerValues.SetValue("Test Op 1", 4) Write some values into the server for those tags.Īrray ItemServerValues = Array.CreateInstance(typeof(object), 7) Label4.Text = (string)ItemServerValues.GetValue(6) Label3.Text = (string)ItemServerValues.GetValue(5) Label2.Text = (string)ItemServerValues.GetValue(4) ItemServerHandles, out ItemServerValues, out ItemServerErrors, out a, out b) Read the values from the server for those tags.Īrray ItemServerValues = Array.CreateInstance(typeof(string), 10)
ItemServerHandles, out ItemServerErrors, RequestedDataTypes, AccessPaths) (6, ref OPCItemIDs, ref ClientHandles, out OPCServer ConnectedOpc = new OPCServer() Īrray OPCItemIDs = Array.CreateInstance(typeof(string), 10) Īrray ItemServerHandles = Array.CreateInstance(typeof(Int32), 10) Īrray ItemServerErrors = Array.CreateInstance(typeof(Int32), 10) Īrray ClientHandles = Array.CreateInstance(typeof(Int32), 10) Īrray RequestedDataTypes = Array.CreateInstance(typeof(Int16), 10) Īrray AccessPaths = Array.CreateInstance(typeof(string), 10) ĬonnectedOpc.Connect("5", "") I got a dll, OPCDAAuto.dll, from a client and I need to utilize this dll to access the KepServerEX 5.2 in order to read and write some values into the PLC module.įor practice purpose, I created a regular website in Visual Studio 2008 and added the reference of the dll, then I used using OPCAutomation in my project to start coding the OPC client. Net website to read and write against Kepware KepServerEX and then deploy the website to IIS7. The goal is to create an OPC client in Asp.