# CertificateLoader.LoadFromStoreCert(string, string, StoreLocation, bool, bool)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.certificateloader/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.certificateloader/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/CertificateLoader.cs#L20-L49)

```csharp
public static X509Certificate2 LoadFromStoreCert(string subject, string storeName, StoreLocation storeLocation, bool allowInvalid, bool server)
```

### Parameters

- `subject` (`string`)
- `storeName` (`string`)
- `storeLocation` (`StoreLocation`)
- `allowInvalid` (`bool`)
- `server` (`bool`)
