-
Notifications
You must be signed in to change notification settings - Fork 14
Https and SSL
Gerardo Sista edited this page Feb 27, 2019
·
3 revisions
If you host SignalGo services in IIS (Internet Information Services), it will automatically handle https directly from IIS. If you want to enable ssl in a pure SignalGo server-client infrastructure, (for example server is a console application running on a Virtual Private Server), then you must provide your certificate in very few codes. Check this this example:
//Open your certificate providing its file path
System.Security.Cryptography.X509Certificates.X509Certificate2 MyCertificate = new System.Security.Cryptography.X509Certificates.X509Certificate2(fileName);
//Set your server provider as https (provider is an instance of ServerProvider)
provider.ProviderSetting.HttpSetting.IsHttps = true;
//tell your server provider to use the provided certificate
provider.ProviderSetting.HttpSetting.X509Certificate = MyCertificate;