jeudi 6 octobre 2016

Azure Service Fabric - Web Api on Owin - https problems

Trying to enable https on my Web Api running on self hosted Owin in Azure Service Fabric (local debugging to start with). Have followed the steps in this blog

My applicationmanifest.xml looks like this:

  <ServiceManifestImport>
    <ServiceManifestRef ServiceManifestName="TheNetPkg" ServiceManifestVersion="1.0.0" />
    <ConfigOverrides />
    <Policies>
      <EndpointBindingPolicy EndpointRef="serviceendpoint" CertificateRef="mycertificate" />
    </Policies>
  </ServiceManifestImport>
  <DefaultServices>
    <Service Name="TheNet">
      <StatelessService ServiceTypeName="TheNetType" InstanceCount="[TheNet_InstanceCount]">
        <SingletonPartition />
      </StatelessService>
    </Service>
  </DefaultServices>
  <Certificates>
    <EndpointCertificate X509StoreName="MY" X509FindValue="‎‎‎‎[thumbprint]" Name="mycertificate" />
  </Certificates>
</ApplicationManifest>

Servicemanifest.xml

<Endpoints>
  <Endpoint Name="serviceendpoint" Type="Input" Protocol="https" Port="8087" />

</Endpoints>

Regarding the certificate (self signed made with makecert) I have verified that it exist in Certificates (Local Computer) -> Personal -> Certificates

I imported the certificate with powershell

 Import-PfxCertificate -Exportable -CertStoreLocation Cert:\LocalMachine\My -FilePath [pathtocertificate\cert.pfx] -Password (Read-Host -AsSecureString -Prompt "Enter Certificate Password")

I have verified that the web api works with http, but then when trying to deploy to the local cluster the Node wont start. When trying to debug what is going on, none of the breakpoints are ever hit.

Have been reading that other people had to enter the thumbprint key one char at the time, that doesn't seem to work either.

Any suggestions to what could be wrong?




Aucun commentaire:

Enregistrer un commentaire