Hey all,
I'm using Carbon inside of Visual Studio to set up IIS websites for localhost development. I'm using a Visual Studio add-in to execute a powershell script after a project builds. Everything works great except SSL bindings in IIS.
When I run this in a PS window or ISE, it works without error, but for some reason inside of this VS add-in, I get an exception thrown from GetSslCertificateBindings which is in the Carbon.dll
Get-CSslCertificateBinding : Exception calling "GetSslCertificateBindings" with "0" argument(s): "The operation
completed successfully"
At C:\Program Files (x86)\WindowsPowerShell\Modules\Carbon\2.7.0\Functions\Test-SslCertificateBinding.ps1:63 char:16
+ $binding = Get-CSslCertificateBinding @getArgs
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-CSslCertificateBinding], MethodInvocationException
+ FullyQualifiedErrorId : Win32Exception,Get-CSslCertificateBinding
Any thoughts on what might be the issue? When the powershell gets executed, the add-in invokes powershell.exe with these arguments: "-ExecutionPolicy Bypass -NonInteractive -File Build\\Local.ps1"
The actual Carbon function inside Local.ps1 looks like this:
Set-IisWebsiteSslCertificate -SiteName $Name -Thumbprint $Thumbprint -ApplicationID "88d1f8da-aeb5-40a2-a5e5-0e6107825df7"
Any thoughts? Since this is only happening for SSL (and inside Visual Studio), there might be some COM or Security things happening here.
Thanks,
Mark