Unable to send HTTPRequest using Photon Plugins

edited March 14 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://?

Comments

  • 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.Ssl3
                    | SecurityProtocolType.Tls
                    | (SecurityProtocolType)768 
                    | (SecurityProtocolType)3072;
  • edited March 15
    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 18
    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.