Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I use msbuild to add a security certificate that I can use in IIS
    primarykey
    data
    text
    <p>I have this target </p> <pre><code>&lt;Target Name = "AddLocalCertificate"&gt; &lt;MSBuild.ExtensionPack.Security.Certificate TaskAction="Add" FileName="$(CertificateLocation)" CertPassword="$(CertificatePassword)"&gt; &lt;Output TaskParameter="Thumbprint" PropertyName="CertificateHash"/&gt; &lt;/MSBuild.ExtensionPack.Security.Certificate&gt; &lt;/Target&gt; </code></pre> <p>and in another target this binding statement</p> <pre><code>&lt;MSBuild.ExtensionPack.Web.Iis7Binding CertificateHash="$(CertificateHash)" TaskAction="Add" MachineName="$(MachineName)" Name="$(SiteName)" BindingInformation="*:$(HttpsPort):$(SiteName)" BindingProtocol="https"/&gt; </code></pre> <p>However when I run the targets I get the error </p> <blockquote> <p>Creating binding with certificate: thumb print 'DBE4964B4C4D0F185E8B1D421D736390AE586EBF' in stor e 'MY' C:\Projects\RC19_Release2\ExternalBinaries\MSBuildGlobalFiles\ManageWebsite.targets(154,3): error : COMException: A specified logon session does not exist. It may already have been terminated. (Exce ption from HRESULT: 0x80070520)\r C:\Projects\RC19_Release2\ExternalBinaries\MSBuildGlobalFiles\ManageWebsite.targets(154,3): error :</p> </blockquote> <p>When I look in IIS it has created the site and the binding is there, but it does not seem to be able to find the certificate, and if I look in the "Server Certificates" on IIS then I cannot see my certificate.</p> <p>If I do MMC -> certificate snap in and go to Current User then I can see my cert in there.</p> <p>How do I either access that certificate from within IIS/msbuild or have msbuild create it in the correct place for IIS to be happy?</p> <p>The msbuild extension help page is this <a href="http://www.msbuildextensionpack.com/help/4.0.5.0/html/45763eac-8f14-417d-9b27-425161982ffe.htm" rel="nofollow">http://www.msbuildextensionpack.com/help/4.0.5.0/html/45763eac-8f14-417d-9b27-425161982ffe.htm</a> but it has not helped me much!</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload