I have developed a OPC UA Client WinForm based .NET application (Visual Studio 2017). It was working fine earlier. No exceptions.
Now after approx 1.5 months, I tried to run the application/Start, it's throwing an exception: " System.InvalidCastException: 'Unable to cast object of type 'System.IO.FileNotFoundException' to type 'Opc.Ua.ServiceResultException'' ".
This exception has occurred me earlier too. When my OPC client application was ready and was getting connected to OPC server too, then after few days, this same exception came. I installed the certificates again and copied all the project files and placed it somewhere else in the directory. Somehow it started working again. I don't know how.
Why I am getting this error? Is it related to certificate re-installation? and what does opc.ua.certificategenerator.exe does ?
Can anyone help me here. It will be huge help to me.
PS: I am using OPC Foundation.
Thank you in advance.