【发布时间】:2017-02-14 22:58:33
【问题描述】:
尝试在 Azure Service Fabric 中的自托管 Owin 上运行的我的 Web Api 上启用 https(从本地调试开始)。已按照this blog中的步骤进行操作
我的 applicationmanifest.xml 看起来像这样:
<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>
服务清单.xml
<Endpoints>
<Endpoint Name="serviceendpoint" Type="Input" Protocol="https" Port="8087" />
</Endpoints>
关于证书(使用 makecert 自签名)我已经验证它存在于证书(本地计算机)-> 个人-> 证书中
我用 powershell 导入了证书
Import-PfxCertificate -Exportable -CertStoreLocation Cert:\LocalMachine\My -FilePath [pathtocertificate\cert.pfx] -Password (Read-Host -AsSecureString -Prompt "Enter Certificate Password")
我已经验证了 web api 可以与 http 一起使用,但是当尝试部署到本地集群时,节点不会启动。当尝试调试正在发生的事情时,没有一个断点被命中。
一直在读到其他人当时必须输入指纹键一个字符,这似乎也不起作用。
对可能出现的问题有什么建议吗?
【问题讨论】:
标签: azure ssl web owin azure-service-fabric