无法找到或获取请求证书的上下文
我正在尝试向 iPhone 发送推送通知。通过在互联网上搜索,我发现使用 winhttpcertcfg 在服务器上注册 P12 文件。 尝试使用此命令
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s "CertificateName" -a "ASPNET"
但是,当我在安装 winhttpcertcfg 后在命令窗口中
时。但我收到错误“无法找到或获取请求证书的上下文”,
您能否建议我,如何解决此错误?
I am trying to send push notification to iphone. By searching on internet i found that register the P12 file on server with winhttpcertcfg. But when I tried with this command
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s "CertificateName" -a "ASPNET"
on command window after installing winhttpcertcfg.
But I am getting the error "Unable to find or obtain a context for request certificate"
Can you please suggest me, how to solve this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以管理员身份打开cmd。
找到 x64 计算机上的 C:\Program Files (x86)\Windows Resource Kits\Tools
或 x86 计算机上的 C:\Program Files\Windows Resource Kits\Tools
运行以下命令顺序命令。这与 IIS 6-7.5
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s CERTIFICATE NAME -a YOUR_COMPUTER_NAME
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s CERTIFICATE NAME -a YOUR_COMPUTER_NAME\IIS_IUSRS< /strong>
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s 证书名称 -a YOUR_COMPUTER_NAME\IUSR
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s 证书名称 -a NetworkService
if一切正常你会看到类似的消息
授予帐户私钥访问权限: ...
也许之后,由于 Windows 的原因,您将不得不等待几分钟。就我而言,证书没有立即应用。
如果您所做的一切正确,请浏览并导航至 https://ws .merchanttest.firstdataglobalgateway.com/fdggwsapi/services/order.wsdl
您将看到以下内容(我的情况)
单击“确定”,您将获得 WSDL 架构。
祝你好运
Open cmd as Administrator.
Locate C:\Program Files (x86)\Windows Resource Kits\Tools for x64 machine
or C:\Program Files\Windows Resource Kits\Tools on x86 machine
Run the following commands sequentially. This match the IIS 6-7.5
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s CERTIFICATE NAME -a YOUR_COMPUTER_NAME
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s CERTIFICATE NAME -a YOUR_COMPUTER_NAME\IIS_IUSRS
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s CERTIFICATE NAME -a YOUR_COMPUTER_NAME\IUSR
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s CERTIFICATE NAME -a NetworkService
if everything ok you will see messages like
Granting private key access for account: ...
Perhaps after that you will have to wait for few minutes due to windows stuffs. In my case certificates was not applied immediately.
If you did everything correct, browser and navigate to https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/services/order.wsdl
you will see the following (my case)
click OK, and you get the WSDL schema.
Good luck
检查您的证书是否位于“MY”证书存储中。
Check if you certificate resides in "MY" certification store.