VB .Net code not working in windows project

I have used VB .Net code in the invoke code activity to bypass certificate validation before a webservice call.

Please see the below code:

System.Net.ServicePointManager.ServerCertificateValidationCallback =
Function(se As Object,
cert As System.Security.Cryptography.X509Certificates.X509Certificate,
chain As System.Security.Cryptography.X509Certificates.X509Chain,
sslerror As System.Net.Security.SslPolicyErrors) True
System.Net.ServicePointManager.Expect100Continue = False

I have made the following changes:
1.Converted a Windows-legacy project to a Windows project
2.Converted the web dll from the .Net framework to the .Net core.

1 Like


Welcome to forums, can you share a screen if you are getting any errors?


Thanks Srinivas,

Please see the below error message

Could not establish trust relationship for the SSL/TLS secure channel with authority

1 Like


The following URL may help you.


Thanks Yoichi,

I have tried those suggestions, but nothing helps.

Can you please see the below screenshot for more information?

My custom package have system.servicemodel.primitives .