Unable to send HTTPRequest using Photon Plugins

edited March 2019 in Photon Server
I'm trying to make a HttpRequest to my azure server but it is throwing following error:

The underlying connection was closed: An unexpected error occurred on a send.

I would also like to know what all these code mean.
I tried same thing using Rest Sharp library , and it is throwing above error only in Load balancing solution.
There request works just fine on Postman and Windows console application.

Please help ASAP. :smile: Thank you :wink:

Update: Works with http:// could you help to get it working with https://?


  • Hi @para_nautilus,

    I think you need to add support for TLS1.2 and SSL3 from the server.
    Try adding this in your server's code:
    System.Net.ServicePointManager.SecurityProtocol = 
                    | SecurityProtocolType.Tls
                    | (SecurityProtocolType)768 
                    | (SecurityProtocolType)3072;
  • edited March 2019
    For my .net version only TLS and SSL two types are supported. :# not the Ssl3 is not there only Ssl is there. and Tls is there
    I tried adding thoes two as it is mentioned here . it does not work. still throws same error.
  • Where did you apply the code?
    I think it needs to be applied from the server code and not from the plugin code.

    I think there is no need to update the .Net version but as you can see in the snippet above, we use hardcoded versions. You can always update the .Net framework version since you have the source code and the VS solution.
  • edited March 2019
    Oh server is working just fine, since postman/ can querry with https successfully, even a empty Visual Studio Windows Console Application can query this successfully, only problem is when this code runs on photon plugin.

    Anyway , i think have to install some kind of certificates i don't know how. I would be great full if you could point me to a source.
  • Hi @para_nautilus,

    Did you solve this or not yet?
Sign In or Register to comment.