Small Basic Forum
Network file transfer - Printable Version

+- Small Basic Forum (https://litdev.uk/mybb)
+-- Forum: Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=1)
+--- Forum: Extensions (https://litdev.uk/mybb/forumdisplay.php?fid=3)
+--- Thread: Network file transfer (/showthread.php?tid=2)



Network file transfer - litdev - 09-02-2023

While reinstating website and extension downloader, I found that various webserver requests, like ftp etc failed.  The solution was to set the following (C#) before starting web requests.
Code:
WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultCredentials;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
I then tried one of my old programs that uses a web resource image and it failed.  It was the same SSL security issue.  The same fix, implemented with LDNetwork.SetSSL().  The following SB now works, even with standard SB ImageList web access for networked resources.
Code:
LDNetwork.SetSSL()
image = ImageList.LoadImage("https://litdev.uk/game_images/rubic.png")
GraphicsWindow.DrawImage(image,0,0)
This should open up a lot of options for networked resources, and is available with LitDev Beta version (1.2.25.0).