SignalGo/SignalGo-full-net

IsHttps causing the client not to connect

Closed this issue · 5 comments

When I set the IsHttps = true I am not longer able to reach the server. I am using the protocol of Duplex with the SignalGo server-client. I changed the server new to https://localhost:9675/SignalGo.

If I comment out the IsHttps line it works but I don't think it is doing it through SSL at that point.

Is there any other settings that I need on either the client or the server to make this work?

Thanks,
Tim

//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;

Hello Tim and Thank you for your Usage and Question of SignalGo.

I think you forgot to set the password of the SSL file that is important sometimes.
it's like this way:

This must works on your browser however in your ClientProvider of c#.

System.Security.Cryptography.X509Certificates.X509Certificate2 ca1 = new System.Security.Cryptography.X509Certificates.X509Certificate2(filePath, sslPassword);
                serverManager.Provider.ProviderSetting.HttpSetting.IsHttps = true;
                serverManager.Provider.ProviderSetting.HttpSetting.X509Certificate = ca1;

So if you are testing in localhost you can make a localhost pfx file with a password and set it to SignalGo.

Best Regards,
Ali

I am still unable to get it to work. I have tried pretty much every combination I could find to try and get around it.
I have attached the sample client and server. The server in this case is building a self signed certificate. If you could take a look and see what I am doing wrong. I would appreciate it. I love the project it is awesome!

CSharp Client Sample.zip
CSharp Server Sample.zip

I think you don't need to use SSL on your localhost, we don't use it as SSL on localhost too.
For tests and local server we just use local port without SSL, our SignalGo server listens to two ports one for SSL and one for none SSL, We use SSL port just for production with a valid pfx file.
So I search more to make a valid pfx for localhost there are hard ways to do that and a lot of them not works.
I think the best way for you to use SSL just for production, not in localhost applications.

Best Regards,
Ali

You wrote: our SignalGo server listens to two ports one for SSL and one for none SSL,

What are the ports that you are listening on? So example http://TestServer1:9675/SignalGo What port would I need to send to to get the SSL.

Is there certain permissions that the pfx file needs to have? Right now the one I am using is Server authenticate and client authenticate. Also does the pfx need to be installed in certain store on the server?

I put it on the server and it is still not returning data or connecting.

Thanks,
Tim

The ports you registered for SSL, for example, if you register the 443 port for your pfx file so your service provider has to listen on 443. there is no limitation of ports. so you can listen to any ports, but in localhost, SSL will not work perfectly.

We just set our valid pfx with a password to SignalGo server provider so that works.
To test your SSL works fine, you can check your SignalGo services in your browser (with call a service) if you see the Green Connection Secure top of your browser that means your SSL work successfully.

                System.Security.Cryptography.X509Certificates.X509Certificate2 ca1 = new System.Security.Cryptography.X509Certificates.X509Certificate2(pfxFilePath, pfxPassword);
                serverManager.Provider.ProviderSetting.HttpSetting.IsHttps = true;
                serverManager.Provider.ProviderSetting.HttpSetting.X509Certificate = ca1;