Results 1 to 4 of 4

Thread: SSL/TLS issue cropped up in old code (visual studio 2013)

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2020
    Posts
    3

    SSL/TLS issue cropped up in old code (visual studio 2013)

    I have some software that I wrote a long time ago and it has not been updated at all. The software communicates with a server to send files up and collect files and it worked fine until the 7th October, but on the 9th it broke (I didn't do anything to my software!) Here is a little code snippet of where it goes wrong:

    Private Function CookieMonster(ByVal cookiestring As String) As Boolean

    Application.DoEvents()
    Dim stringlist As String() = cookiestring.Split("=")
    Dim request As HttpWebRequest = Nothing

    MakeRequest(request, stringlist)

    Try
    Dim myResponse As WebResponse = Nothing
    myResponse = request.GetResponse()]


    It's that last line that throws an error:

    "The request was aborted: Could not create SSL/TLS secure channel"

    I have tried compiling this in Visual Studio 2019 as well (I just copied the project straight across) but I still can't get it to work and have no idea unfortunately. Does my code need updating? If this isn't enough, I can post other relevant bits.

  2. #2
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,836

    Re: SSL/TLS issue cropped up in old code (visual studio 2013)

    Maybe the server was upgraded and now your program needs updated too?
    Please remember next time...elections matter!

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2020
    Posts
    3

    Re: SSL/TLS issue cropped up in old code (visual studio 2013)

    I have a feeling that is the case. I'm looking at the httpwebrequest stuff and one suggestion is using WebClient - I have no experience with that though (it's been 5 years since I've done any programming in any language, never mind VB so I'm really stuck here!). Essentially I have a string I want to upload to a URL in one case and a file I want to intercept from another.

  4. #4
    Frenzied Member
    Join Date
    Jul 2011
    Location
    UK
    Posts
    1,335

    Re: SSL/TLS issue cropped up in old code (visual studio 2013)

    Quote Originally Posted by Jet_Black View Post
    "The request was aborted: Could not create SSL/TLS secure channel"
    It could be that you need to specify a higher security protocol level, especially if your OS is pre Windows 8.

    See the remarks section in the documentation for the ServicePointManager.SecurityProtocol Property, particularly the fourth paragraph:
    Your code should never implicitly depend on using a particular protection level, or on the assumption that a given security level is used by default. If your app depends on the use of a particular security level, you must explicitly specify that level and then check to be sure that it is actually in use on the established connection. Further, your code should be designed to be robust in the face of changes to which protocols are supported, as such changes are often made with little advance notice in order to mitigate emerging threats.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width