Skip to content

Commit 44c3128

Browse files
authored
Expand explanatory text for code snippet
1 parent 2e6e05f commit 44c3128

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

articles/app-service/configure-ssl-certificate-in-code.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ var cert = new X509Certificate2(bytes);
181181

182182
### [Windows](#tab/windows)
183183

184-
.NET Framework
184+
The following C# example shows how to load a public certificate in a .NET Framework app in a Windows Server Core Container.
185185

186186
```csharp
187187
using System;
@@ -213,7 +213,7 @@ using (X509Store certStore = new X509Store(StoreName.My, StoreLocation.LocalMach
213213
}
214214
```
215215

216-
.NET Core
216+
The following C# example shows how to load a public certificate in a .NET Core app in a Windows Server Core or Windows Nano Server Container.
217217

218218
```csharp
219219
using System.Security.Cryptography.X509Certificates;
@@ -223,10 +223,12 @@ string Thumbprint = "C0CF730E216F5D690D1834446554DF5DC577A78B";
223223
using X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
224224
{
225225
store.Open(OpenFlags.ReadOnly);
226-
226+
227+
// Get the first cert with the thumbprint
227228
var certificate = store.Certificates.OfType<X509Certificate2>()
228229
.First(c => c.Thumbprint == Thumbprint) ?? throw new Exception($"Certificate with thumbprint {Thumbprint} was not found");
229230

231+
// Use certificate
230232
ViewData["certificateDetails"] = certificate.IssuerName.Name.ToString();
231233
}
232234
```

0 commit comments

Comments
 (0)