locked
How identify HTTP/2 on ASP Classic page? RRS feed

  • Question

  • User-41882152 posted

    How identify HTTP/2 on ASP Classic page?

    ASP Classic page with HTTP/2 response have this server variables (Request.ServerVariables):

    SERVER_SOFTWARE: Microsoft-IIS/10.0

    SERVER_PROTOCOL: HTTP/1.1
    SERVER_PORT: 443
    SERVER_PORT_SECURE: 1
    REQUEST_METHOD: GET

    Sunday, March 15, 2020 7:44 PM

All replies

  • User-460007017 posted

    Hi Andrey.IIS,

    When you enable HTTPS for your IIS 10 website, HTTP/2get activated automatically.

    So please create https website and bind it with your https binding.

    https://docs.microsoft.com/en-us/iis/manage/configuring-security/how-to-set-up-ssl-on-iis

    In some case, HTTP/2 is not supported.

    • Windows authentication (NTLM/Kerberos/Negotiate) is not supported with HTTP/2. In this case IIS will fall back to HTTP/1.1.
    • Clear text - as mentioned above, IIS currently only supports HTTP/2 over TLS. Again, IIS will fall back to HTTP/1.1.
    • Bandwidth throttling - IIS has a feature to limit bandwidth (in Inetmgr, select the site, 'Limits' under Configure of the Action pane). This applies to HTTP/1.1 but is not enforced for HTTP/2 (will proceed with no errors or bandwidth limiting).

    If the reply is helpful, it is appreciated if you could mark it as answer.

    Best Regards,

    Jokies Ding

    Monday, March 16, 2020 1:59 AM
  • User-41882152 posted

    Hi Yuk,

    The question was not about how setting up the server to use https or http/2. There are no problems with this.

    The problem and the question is how to determine inside Classic ASP server side code this protocol that server use to sends this page to the client. How detect that exactly http/2 used?

    http/2 and http/1.1 have the same Request.ServerVariables including this:

    SERVER_PROTOCOL: HTTP/1.1

    SERVER_PORT: 443

    SERVER_PORT_SECURE: 1

    Tuesday, March 17, 2020 9:06 PM
  • User-460007017 posted

    Hi Andrey.IIS,

    HTTP 2.0 is the next generation of HTTP that allows multiplexing of multiple HTTP 1.1 connections inside one HTTP 2.0 connection. 

    So Server_Protocol always return HTTP/1.1.

    So if you wonder if the request is connected via http/2, then you could check whether the response server is IIS 10 and whether the request is connected via https.

    No server variable can display http/2 directly.

    If the reply is helpful, it is appreciated if you could mark it as answer.

    Best Regards,

    Jokies Ding

    Thursday, March 19, 2020 9:32 AM