Details
Description
When starting a network request in an isolated network (where the internet cannot be reached) to a (reachable) resource in the local network, the request immediately fails with the error message "Network access is disabled".
It seems like Qt relies on the state of the network interface that gets reported by Windows, as Windows also defines the interface state as "No internet access". But in this case, internet access is not required, as we make a request to a web service on the local network. (The request completes successfully in a standard browser, but with QNetworkAccessManager, the request immediately fails.)
Please find the minimal example to reproduce this problem attached. To be able to actually reproduce the issue, you need to be on an isolated network, or change your network adapter settings so that the internet cannot be reached anymore (change Gateway and DNS to invalid settings), and change the QUrl value to a reachable website on the local network.
In our specific use case, a customer has a firewall in place that blocks every connection except to the webserver that our application needs. In this use case, the windows connection also appears with "no internet access", but the webserver would be reachable just fine.
Attachments
Issue Links
- is duplicated by
-
QTBUG-92987 "Network access is disabled" when connecting to resource in local network without Internet access
- Closed