Background plugin unable to make http requests

Hi Team,

I have been trying to get our background plugin to make an HTTP POST request to one of our APIs. The current solution creates a new thread on configurationChanged events from our admin management plugin, and this thread makes the request to our API.

Using both RestSharp and the .NET WebRequest class, results in similar behaviors. In both cases the response object is empty and I get an HTTP code 0. Another interesting behavior is that using Fiddler (a tool to view request being made to and from a machine), no request can be seen coming from the machine running Milestone.

By looking at the MIP logs I can see the event server running properly, and I can see the data from the configuration changed object coming in properly from the admin management plugin. I can also make requests from the machine running Milesone to our API using Postman instead of the MIP plugin. This request from postman is visible in Fiddler as well.

This has led me to think that maybe the Plugin is restricted or unable to make HTTP requests. I understand that troubleshooting connection issues with 3rd party APIs can involve a lot of possible issues, but I was wondering if there was a specific way for making HTTP request from a MIP plugin?

Thanks,

It seems to not have been an issue with milestone but rather at TLS issue that did not cause any visible errors in the logs. RestSharp works fine in the MIP SDK background plugin.

Thanks for the update! I can confirm that there are basically no limitations imposed on plugin developers so if something doesn’t work as expected, it will usually come down to the necessary dependencies not being present in the plugin folder, or maybe a dependency version mismatch where Milestone uses a different version of the same nuget package for example (usually binding redirects handle this for you).

In this case it sounds like maybe the default SSL/TLS settings for the WebRequest class were either preventing you from connecting to a TLS 1.2/3 web service, or it was requiring a newer version of TLS than the web service is using. I run into this with PowerShell frequently where on older servers I have to modify System.Net.ServicePointManager.SecurityProtocol to include support for TLS 1.2 before I can install/update modules from PSGallery.