Is it possible to use the Tridion Docs WCF functions if your server does not have a valid cert? I am running the basic code seen at the link below but it throws an exception about trusting the server. The server does not have a valid certificate.
Is it possible to use the Tridion Docs WCF functions if your server does not have a valid cert? I am running the basic code seen at the link below but it throws an exception about trusting the server. The server does not have a valid certificate.
Hi Adam,
If this is about the transport certificate, then have a look at https://github.com/sdl/ISHRemote/blob/472f0c7074bf003431b89cf376ecc698e4c1c86b/Source/ISHRemote/Trisoft.ISHRemote/HelperClasses/CertificateValidationHelper.cs which is used in ISHRemote when you run a
New-IshSession -WsBaseUrl https://ish.example.com/ISHWS/ -PSCredential admin -IgnoreSslPolicyErrors
This is in essence a .NET Framework coding problem, which you can google the internet for. I do feel the above should get you going.
-Dave
Hi Adam,
If this is about the transport certificate, then have a look at https://github.com/sdl/ISHRemote/blob/472f0c7074bf003431b89cf376ecc698e4c1c86b/Source/ISHRemote/Trisoft.ISHRemote/HelperClasses/CertificateValidationHelper.cs which is used in ISHRemote when you run a
New-IshSession -WsBaseUrl https://ish.example.com/ISHWS/ -PSCredential admin -IgnoreSslPolicyErrors
This is in essence a .NET Framework coding problem, which you can google the internet for. I do feel the above should get you going.
-Dave
Thanks for the response Dave. I did try that and I get a different error message.
The provided URI scheme 'https' is invalid; expected 'http'.
Parameter name: via
To be more specific, the error message I am seeing is this...
Could not establish trust relationship for the SSL/TLS secure channel with authority 'servername'.
Sorry Adam, the only thing I can say, it is surely possible. There is however little meat to the bone in this forum thread to investigate what your setup looks like. Did you try ISHRemote (see above) or even Publication Manager as they can give hints as well.
The error you mention is a .NET Framework error, and Google give you plenty of results, and tips on that. Hope this helps.
Thanks for the effort, I tried Publication Manager and get the same message.
What got the code working for me was adding the server's certificates to my windows Trusted Root Certificate store and using what seems like the older way of accessing the API where you add a service reference to the config and use the following code.
var applicationClient = new Application25ServiceReference.ApplicationClient();
//Create a channel from the client and inject the token.
applicationClient.ClientCredentials.UserName.UserName = "eaxmpleuser";
applicationClient.ClientCredentials.UserName.Password = "examplepassword";
var version = applicationClient.GetVersion();
Thanks for closing the loop Adam... It does look like you switched to ASMX-SOAP (with proprietary authentication) instead of WCF-SOAP (with WS-Trust authentication.