I am developing OPC Client in windows C#. I have developed the code and reading OPC Items on Sampling as well as event based (OnDataChange). When I am working with local machine then my code works fine with both Sampling as well as OnDataChange, but when I am trying to read data from Remote OPC Server then Sampling works fine but I am not able fetch data on event based process. I am able to connect to the OPC Server but when i am adding subscription to it then i am getting error.
HRESULT : 0x80040202.
group1.DataChanged += new DataChangeEventHandler(this.DataChangeHandler);
group1.AdviseIOPCDataCallback();//exception HRESULT : 0x80040202.
OPC server connected & then register the group also but i got the exception when reading data.