473,396 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Exception from HRESULT: 0x80040202 in OPC Client OnDataChange Addhandler.

Hi all,
I am developing OPC Client in VB.net. 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.

Public NetCredentials As New System.Net.NetworkCredential
Dim connectdt As Opc.ConnectData
Public WithEvents Subscription As ISubscription = Nothing
Public State As New Opc.Da.SubscriptionState

State = New Opc.Da.SubscriptionState

State.Active = True
State.UpdateRate = 500
Subscription = OpcServer.CreateSubscription(State)
results = Subscription.AddItems(Items)
AddHandler Subscription.DataChanged, New DataChangedEventHandler(AddressOf OnDataChange) ' Here is the error.

I appreciate if anybody suggests some solution.

Thanks in advance.


Prashprince
Dec 26 '07 #1
0 1629

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Mark | last post by:
I have a COM object that calls into a C# Forms library. The library can throw exceptions and I want to handle the exceptions in COM. Adam Nathan wrote a Microsoft sponsored book titled .Net and Com...
4
by: Shimon Sim | last post by:
I just switch my asp application to .net 2 and got this error. Any reasons why? Thank you. Server Error in '/RAFEmployee' Application....
5
by: Mikil | last post by:
I am communicating with Excel Interop dll using c#. The get_Range function throws an exception if the parameters are invalid. For e.g. get_Range("Mikil", Type.Missing); will crash if the "Mikil"...
11
by: Don | last post by:
When using Visual Basic .NET with a reference to Interop.Outlook, is there a way to get more detailed information about an error other than Exception.Message or Exception.ToString? For example,...
0
by: Pieter | last post by:
Hi, When using clickOnce for a VB.NET 2.0 application it installs fine on every computer, except one (a new one...). Every is isstalled, Framework, Mdac, .... The error in the log file is:...
1
by: getelectronic | last post by:
Hi all I have a sample code to implement opc client in Python. i use a file .py making by makepy with pythonwin for Com Interface. i can get all server in machine, connect to server opc,...
8
by: sankar.vikram | last post by:
Hi I am using a com component in my C# application. But i getting error while i tried to call multiple events from my application. I'm getting the error "Exception from HRESULT: 0x80040202" ...
1
by: =?Utf-8?B?UHJhc2hhbnQgS2hvbmRl?= | last post by:
Hi all, I am developing OPC Client in VB.net. 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...
4
by: yogarajan | last post by:
The specified module could not be found. (Exception from HRESULT: 0x8007007E) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.