Access oData Feed with an Untrusted SSL Certificate from LinqPad
I'm trying to access an oData feed I've created on Windows Azure using Visual Studio LightSwitch in VS2011 Beta. The feed uses SSL, but it's a self-signed certificate and, of course, it's untrusted. Trying to connect to the feed from LinqPad gives the error
In my .NET code I can do something like
to wrap the calls and ignore the error.
Is there a way to get LinqPad to ignore the error?
"Error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."
In my .NET code I can do something like
// save the current SSL Checking behaviour
var oldCallBack = ServicePointManager.ServerCertificateValidationCallback;
// Ignore SSL errors
ServicePointManager.ServerCertificateValidationCallback =
(sender, certificate, chain, sslPolicyErrors) => { return true; };
// Do my call to the self-signed site here
// reset SSL behaviour
ServicePointManager.ServerCertificateValidationCallback = oldCallBack;
to wrap the calls and ignore the error.
Is there a way to get LinqPad to ignore the error?
Comments
www.linqpad.net/beta.aspx