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.
Unobserved Task Exception when Using EasyUAClient
thank you for update.
Regarding the other exception, I was not aware of it, and with high probability, it is something that comes from the OPC Foundation stack layer, and was probably fixed in there, and I took over the fix by updating to a newer version of the stack.
Best regards
Please Log in or Create an account to join the conversation.
- gkalipershad
- Topic Author
- Offline
- Platinum Member
- Posts: 89
- Thank you received: 2
Furthermore, another customer approached me because they were receiving the following exception every time they introduced an EasyUAClient object:
+ InnerException {"Unable to cast object of type 'System.Net.Mail.SmtpClient' to type 'System.Net.HttpWebRequest'."} System.Exception {System.InvalidCastException}
Upgrading to the latest build resolved this issue as well. He was previously on 5.59.1034.1, so it is possible that another change in the toolkit addressed the problem, but I wanted to document here in case someone else ran into something similar.
Please Log in or Create an account to join the conversation.
- gkalipershad
- Topic Author
- Offline
- Platinum Member
- Posts: 89
- Thank you received: 2
Please Log in or Create an account to join the conversation.
this is now fixed in 5.70.1053.1.
I will send you an email with download info.
Best regards
Please Log in or Create an account to join the conversation.
- gkalipershad
- Topic Author
- Offline
- Platinum Member
- Posts: 89
- Thank you received: 2
Thanks,
GK
Please Log in or Create an account to join the conversation.
Thank you for the project. I was able to reproduce the error, and I can confirm it is a problem in version 5.70. And, it has already been fixed in the upcoming version 5.71, but that is not going to be released any time soon.
The error comes from an internal "warm-up" processing that is being done in order to force .NET to compile parts of toolkit code as soon as possible, so that the subsequent operations are executed faster. The warm-up code attempts a connection to an invalid address, which causes the exception. It is wrong that it happens, but it is essentially harmless.
With this explanation, is it required to provide a fix into version 5.70?
Best regards
Please Log in or Create an account to join the conversation.
- gkalipershad
- Topic Author
- Offline
- Platinum Member
- Posts: 89
- Thank you received: 2
The error still occurs, but the application never crashes due to how the exception is being handled. I think we are trying to figure out where the exception comes from in the first place because it is only present one an EasyUAClient object is introduced.
Regards,
GK
Please Log in or Create an account to join the conversation.
You forgot to "insert" the attachment.
But I probably know know where this might be coming from. Can you answer one question:
When the application is run *outside* the Visual Studio & debugger, does this exception crash the application?
Or is it just something that happens inside the debugger?
Regards
Please Log in or Create an account to join the conversation.
- gkalipershad
- Topic Author
- Offline
- Platinum Member
- Posts: 89
- Thank you received: 2
.NET 6.0
VS2022
Windows 10.0.22621
The user set up a sample application that sets some shared static properties when the application starts, while also kicking off a task to do some other things. Once the GC kicks in, we see an Unobserved Task Exception occur around DNS. This only happens when there is an EasyUAClient object instantiated.
The following error is generated: Unobserved Task Exception: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostname')
I have attached a sample Console application that highlights the problem. Please let us know if the error stems from something we are doing incorrectly, or if there is something happening under the hood with the EasyUAClient Object.
Attachments:
Please Log in or Create an account to join the conversation.