Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Commit 743ec6e

Browse files
committed
Added README steps to trust IIS Express SSL certificate
1 parent 650312c commit 743ec6e

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,33 @@ There are two projects in this sample. Each needs to be separately registered i
103103

104104
### Step 5: Trust the IIS Express SSL certificate
105105

106-
Since the web API is SSL protected, the client of the API (the web app) will refuse the SSL connection to the web API unless it trusts the API's SSL certificate.
106+
Since the web API is SSL protected, the client of the API (the web app) will refuse the SSL connection to the web API unless it trusts the API's SSL certificate. Use the following steps in Windows Powershell to trust the IIS Express SSL certificate. You only need to do this once. If you fail to do this step, calls to the TodoListService will always fail with Access Denied.
107107

108-
Coming soon.
108+
Begin by opening a Windows Powershell command window as Administrator.
109+
110+
Query your personal certificate store to find the thumbprint of the certificate for `CN=localhost`:
111+
112+
```
113+
PS C:\windows\system32> dir Cert:\LocalMachine\My
114+
115+
116+
Directory: Microsoft.PowerShell.Security\Certificate::LocalMachine\My
117+
118+
119+
Thumbprint Subject
120+
---------- -------
121+
C24798908DA71693C1053F42A462327543B38042 CN=localhost
122+
```
123+
124+
Next, add the certificate to the Trusted Root store:
125+
126+
```
127+
PS C:\windows\system32> $cert = (get-item cert:\LocalMachine\My\C24798908DA71693C1053F42A462327543B38042)
128+
PS C:\windows\system32> $store = (get-item cert:\Localmachine\Root)
129+
PS C:\windows\system32> $store.Open("ReadWrite")
130+
PS C:\windows\system32> $store.Add($cert)
131+
PS C:\windows\system32> $store.Close()
132+
```
109133

110134
### Step 6: Run the sample
111135

0 commit comments

Comments
 (0)