Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85913

"Network access is disabled" when connecting to resource in local network without Internet access

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.14.2, 5.15.0
    • Fix Version/s: 5.15.1, 6.0.0
    • Component/s: Network
    • Labels:
      None
    • Environment:
      Win10 2004, MSVC2015
    • Platform/s:
      Windows
    • Commits:
      a96fc6e65cba14d80665ef5f8932f004f7f4a1e3

      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            manordheim Mårten Nordheim
            Reporter:
            erwinkandler Erwin Kandler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes