无法找到或获取请求证书的上下文 [英] Unable to find or obtain a context for request certificate

查看:47
本文介绍了无法找到或获取请求证书的上下文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试向 iphone 发送推送通知.通过在互联网上搜索,我发现使用 winhttpcertcfg 在服务器上注册 P12 文件.但是当我尝试使用此命令时

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 "证书名称" -a "ASPNET"

winhttpcertcfg -g -c LOCAL_MACHINE\MY -s "CertificateName" -a "ASPNET"

安装 winhttpcertcfg 后的命令窗口.

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?

推荐答案

  1. 打开 MMC 控制台
  2. 为计算机帐户"添加证书管理单元.下一步.
  3. 选择本地计算机".下一个
  4. 找到个人\证书".
  5. 打开此文件夹的上下文菜单.选择任务\导入.
  6. 找到您的 p12 证书.下一个
  7. 在证书名称".ks.pw.txt 文件中找到密码并使用它.下一个
  8. 下一步.完成.

以管理员身份打开 cmd.

Open cmd as Administrator.

定位 C:\Program Files (x86)\Windows Resource Kits\Tools for x64 机器

Locate C:\Program Files (x86)\Windows Resource Kits\Tools for x64 machine

C:\Program Files\Windows Resource Kits\Tools 在 x86 机器上

or C:\Program Files\Windows Resource Kits\Tools on x86 machine

依次运行以下命令.这个匹配IIS 6-7.5

Run the following commands sequentially. This match the IIS 6-7.5

winhttpcertcfg -g -c LOCAL_MACHINE\MY -s 证书名称 -a YOUR_COMPUTER_NAME

winhttpcertcfg -g -c LOCAL_MACHINE\MY -s 证书名称 -a YOUR_COMPUTER_NAME\IIS_IUSRS

winhttpcertcfg -g -c LOCAL_MACHINE\MY -s CERTIFICATE NAME -a YOUR_COMPUTER_NAME\IIS_IUSRS

winhttpcertcfg -g -c LOCAL_MACHINE\MY -s 证书名称 -a YOUR_COMPUTER_NAME\IUSR

winhttpcertcfg -g -c LOCAL_MACHINE\MY -s CERTIFICATE NAME -a YOUR_COMPUTER_NAME\IUSR

winhttpcertcfg -g -c LOCAL_MACHINE\MY -s 证书名称 -a 网络服务

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: ...

也许在那之后你将不得不等待几分钟,因为 Windows 的东西.在我的情况下,证书没有立即应用.

Perhaps after that you will have to wait for few minutes due to windows stuffs. In my case certificates was not applied immediately.

如果一切都正确,请浏览并导航到 https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/services/order.wsdl

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)

单击确定",您将获得 WSDL 模式.

click OK, and you get the WSDL schema.

祝你好运

这篇关于无法找到或获取请求证书的上下文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆