windows 我应该对 netsh.exe 使用什么 appid?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/537173/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What appid should I use with netsh.exe?
提问by Brann
The netsh command wants an appid (see here) :
netsh 命令需要一个 appid(参见此处):
netsh http add sslcert ipport=0.0.0.0:8000 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={00112233-4455-6677-8899-AABBCCDDEEFF}
I've not been able so far to understand how I'm supposed to know the GUID netsh wants me to provide. Any hints?
到目前为止,我一直无法理解我应该如何知道 netsh 希望我提供的 GUID。任何提示?
回答by Rasmus Faber
You can use any valid GUID. It is only used to allow you to identify the binding later.
您可以使用任何有效的 GUID。它仅用于允许您稍后识别绑定。
回答by atconway
I used the Application GUID for my WCF service that is located within the AsseblyInfo.vb (VB.NET) or AssemblyInfo.cs (C#) file of my hosting application (Windows Service) as show below:
我将应用程序 GUID 用于我的 WCF 服务,该服务位于我的托管应用程序(Windows 服务)的 AsseblyInfo.vb (VB.NET) 或 AssemblyInfo.cs (C#) 文件中,如下所示:
<Assembly: Guid("8fbacae2-bd4e-8ef5-b202-1561845dd04f")>
I used this as the appid parameter for the netsh.exe tool like so:
我将其用作 netsh.exe 工具的 appid 参数,如下所示:
appid={8fbacae2-bd4e-8ef5-b202-1561845dd04f}
It worked perfectly and my WCF service uses Https via that SSL cert.
它运行良好,我的 WCF 服务通过该 SSL 证书使用 Https。
回答by AgathoSAreS
"It always says Invalid Argument …"
“它总是说无效参数......”
try appid="{7E46BD40-39C6-4813-B414-019AD1122333}"
尝试 appid="{7E46BD40-39C6-4813-B414-019AD1122333}"
with quotes.
带引号。
(Sorry, not direct answer to this question, but this is often first google hit, and a lot of people seem to have this problem. More: "The parameter is incorrect." error using netsh http add sslcert)
(对不起,不是直接回答这个问题,但这通常是第一个谷歌命中,很多人似乎都有这个问题。更多:“参数不正确。”使用 netsh http add sslcert 时出错)
回答by Keith H.
If you bind a cert using the IIS GUI (inetmgr.exe), then perform 'netsh http show sslcert', you'll see the AppID of {4dc3e181-e14b-4a21-b022-59fc669b0914}, which is the AppID IIS uses, so it's the appid I use, too.
如果您使用IIS GUI(inetmgr.exe)绑定证书,然后执行'netsh http show sslcert',您将看到{4dc3e181-e14b-4a21-b022-59fc669b0914}的AppID,这是IIS使用的AppID,所以这也是我使用的 appid。