相关疑难解决方法(0)

使用netsh,将SSL证书绑定到端口号失败

我已按照SSL中的说明使用自托管WCF服务.当我尝试使用netsh在Windows 7上绑定证书时,如如何:使用SSL证书配置端口中所述.,它失败如下.

在Windows PowerShell中

PS C:\> netsh http add sslcert ipport=0.0.0.0:8732 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={00112233-4455-6677-8899-AABBCCDDEEFF}
Bad numeric constant: 224.
At line:1 char:104
+ netsh http add sslcert ipport=0.0.0.0:8732 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={001 <<<< 12233-4455-6677-8899-AABBCCDDEEFF}
+ CategoryInfo          : ParserError: (224:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : BadNumericConstant
Run Code Online (Sandbox Code Playgroud)

在命令提示符下

C:\>netsh http add sslcert ipport=0.0.0.0:8732 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={00112233-4455-6677-8899-AABBCCDDEEFF}

SSL Certificate add failed, Error: 1312
A specified logon session does not exist. It may already have been terminated.
Run Code Online (Sandbox Code Playgroud)

wcf-binding ssl-certificate windows-7 netsh

33
推荐指数
4
解决办法
5万
查看次数

如何使用 appcmd.exe 为 HTTPS 添加新绑定

我有以下脚本来设置我的网站...

%AppCmd% ADD SITE /name:%SiteName% /physicalPath:%SitePath% /bindings:http/*:80:%SiteName%
%AppCmd% SET SITE /site.name:%SiteName% /[path='/'].applicationPool:%SiteName%
Run Code Online (Sandbox Code Playgroud)

我现在想做的是找出如何为 HTTPS添加附加绑定。看到很多页面现在描述将主机头添加到现有的 https 绑定,但没有显示实际如何像在 UI 中那样添加新绑定。

注意:我相信我需要两个绑定,一个 HTTP(端口 80)和一个 HTTPS(端口 443),因为目前我需要打开端口 80,因为我使用重定向规则来交换在端口 80 上访问站点的人443.如果有一种方法可以避免这样做,并且只是我的绑定,我完全赞成。

iis appcmd

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

appcmd ×1

iis ×1

netsh ×1

ssl-certificate ×1

wcf-binding ×1

windows-7 ×1