Unable to find or obtain a context for request certificate
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 "Unab开发者_C百科le to find or obtain a context for request certificate"
Can you please suggest me, how to solve this error?
- Open MMC console
- Add Certificates snap-in for "Computer Account". Next.
- Select "Local Computer". Next
- Locate "Personal\Certificates".
- Open context menu on this folder. Select Tasks\Import.
- Find your p12 certificate. Next
- Find password in "certificate name".ks.pw.txt file and use it. Next
- Next. Finish.
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
Check if you certificate resides in "MY" certification store.
精彩评论