Trying to get开发者_JS百科 rid of the mismatch error in IE8 when testing on localhost.
Tried installing the Cert as admin, in IE8 and use the trusted list. Can not change the CommonName in the cert.
Tried Selfssl.exe and MakeCert winhttpcertcfg - did not try this, but not sure it will work on win7
MakeCert created a file, but it was a .CER file and IIS7 is not seeing it. Tried placing it in the MMC certificate folders, for "Computer Account" (personal and Trusted Root...)folders. Actually just about everyfolder.
Win 7 VS2010 IE8 Need localhost https selfsigned cert to not throw error i IE8?
I would not mind the MakeCert.exe if IIS7 would see the .CER file or convert it.
Was able to create and associate the certs with help from user295734's answer on Feb 15 2011. Steps that I followed:
- Launch command prompt as administrator
- Run:
cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin"
- Run
makecert -r -pe -n "CN=localhost" -sky exchange -sv C:\selfcert.pvk C:\selfcert.cer
- New window appears, asking to set password. This example uses the letter ‘a’, as the next instruction line below uses this password after the ‘-pi’ instruction. Password specified here could be ‘anything’, but next instruction line must contain
-pi anything
rather than-pi a
. - Back at command prompt, run:
pvk2pfx -pvk C:\selfcert.pvk -pi a -spc C:\selfcert.cer -pfx C:\selfcert.pfx
- Three new files should now exist:
a.c:\Selfcert.pvk
b.c:\Selfcert.cer
c.Selfcert.pfx
- Close command prompt window
- Launch MMC.exe from the start bar search box.
- Within mmc, goto File\ Add\Remove Snap-in
- Choose Certificates from the available snap-ins pane and click the Add button
- In window that appears, choose computer account -> Next -> Local Computer -> Finish.
- Click OK on the Add or Remove Snap-ins window.
- Expand Certificates (Local Computer) in the pane containing Console Root
- Right click on the folder marked Personal and choose All Tasks -> Import
- Certificate Import Wizard will appear, Click Next.
- Click Browse and the Open dialog will appear
- Make sure to choose Personal Information Exchange (*.pvx) in the file filter dropdown.
- Nav to c:\selfcert.pfx (that we created earlier) and click Open.
- After selecting the file, chose Next in the Certificate Import Wizard.
- In the password box, type the password specified in step 4 above. For this example I used "a".
- Click Next.
- Choose "Place all certificates in the following store Personal" and click Next, then Finish.
- You will be notified that import was success and will see that the localhost pfx is available in the personal\certificates folder.
- Repeat steps 14 through 23 for "Trusted Root Certification Authorities".
Was able to create the PFF cert file with these cmd lines, created a batch file below. On Win7 IIs7 IE8 Make sure you have the programs makecert and pvk2pfx
Use the BAT below to create the cert files. (use any tmp path, has to exist or will not run) Then you'll use the MMC(some instructions below BAT) to import the PFX (NOT the CER) file into MMC certificates(Personal and trusted Root)
@echo off
cls
cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin"
makecert -r -pe -n "CN=localhost" -sky exchange -sv C:\_bat\_cert\selfcert.pvk C:\_bat\_cert\selfcert.cer
pvk2pfx -pvk C:\_bat\_cert\selfcert.pvk -pi a -spc C:\_bat\_cert\selfcert.cer -pfx C:\_bat\_cert\selfcert.pfx
pause
NOTE: -pi a is the password. It will ask you for this when you run these programs. You can set -pi to what ever, but make sure to set it, because when importing the PFX cert it will ask you for this password.
using MMC to create pvk file cmd prompt run mmc (mmc.exe).
File >> Add/removeSnap-in >> Certificates >> ADD >> Computer account >> OK Open Certificates under Console Root. Right click Personal >> All Tasks >> Import. Then import the PFX file into the Personal Certificates and Trusted Root Cert. Auth.
In IIS7, choose Certificates, refresh, and the localhost cert should be there.
There was also 2 other programs to help out, that i did not get to try cert2spc C:_bat_cert\selfcert.cer C:_bat_cert\selfcert.spc pvkimprt -pfx C:_bat_cert\selfcert.pvkselfcert.spc C:_bat_cert\selfcert.pvkselfcert.pvk
The localhost cert did remove my IE8 warning!
But my main issue was with downloading files over https://localhost I thought it was cert problem, but the error is still showing, "Unable to download from localhost" Any suggestions on the download problem?
精彩评论