The message is generated because the call to curl the site's root url with https threw an exception so that's where to look.
The try/catch block is in administrator/components/com_config/model/application.php lines 126-159, so if you can single-step through there in a debugger you should see what's going wrong. No debugger? Inserting echo statements at appropriate places will help, so long as you don't mind things like that trashing your view in the admin panel. (I suppose you could try and log to the console output, if you'd rather.)
If your problem is that curl isn't available, and it's failing because that, I'm afraid I have no knowledge about how to install that for IIS (I'm just assuming its possible, b/c MS at one time was distributing Joomla on one of their web application CDs when they were courting PHP devs for IIS). I suspect it's as simple as locating the php.ini file and turning it on, though (check the "System Information" panel under 'System' in the Joomla admin for details on where to find it).
Also, thanks to @mickmackusa I took a second look at that error; forget what I said about $response. My bad. It has no effect on this particular error.
JHttpFactory::getHttp($options)->get('https://' . $host . JUri::root(true) . '/', array('Host' => $host), 10);
is the line that is failing. Yeah it looks like a batch of gobbledy-gook (that's what I hate about the so-called "fluent" approach to coding; it's confusing to read) but I'll break it down for you:
JHttpFactory::getHttp($options)
is what gets the tool that will make the http request. Since you're not getting an error about a bad method call, I think we can assume that call is succeeding. Therefore:
get('https://' . $host . JUri::root(true) . '/', array('Host' => $host), 10);
is probably our culprit. There are three arguments passed in:
- URL as string
- array of headers to send
- timeout limit in seconds
From the error message we see it waited the ten seconds and came back empty-handed. This probably excuses the headers from the likely problem list, so we're left with the other two, which might mean:
- The URL is bad
- Your server is taking too long to respond, possibly because it can't find itself. (Sounds strange, but I've seen it happen.)
So first try to echo out the URL string being built, then try to contact that same URL from the server. If you time out, there's either something wrong at the server itself, or with the resolution of the name (you can ping the domain string -- www.example.com -- from the server's command line). Watch the time it takes to get a response, maybe it's just slow. Timeout values are hard; set them too long and users get impatient waiting for a response and leave before seeing the error, too short and slow machines trigger errors needlessly.