Angularjs (client) and .Net WebAPI not working on Windows server 2016 (IIS 10) RRS feed

  • Question

  • User-1839745221 posted

    My client app is created using Angularjs and WebAPI is in.Net (framework 4.7.2)

    Problem: Earlier my app was hosted on Windows server 2012 R2 and app is working fine on it but now I am trying to host the same app on Windows Server 2016(IIS 10) but now client user login authentication isn't working on it (for login authentication i am using Identity server)

    Reasons according to my investigation:-

    1. By default, HTTP2 is supported on windows server 2016 and if I disable http2 on the server then the app works fine.

    2. Or if I change SSL setting (In IIS) by checking 'Require SSL' and select 'Accept' option then also application works well. But in this case, WebAPI calls uses http1.1 protocol so that's the reason it starts working.

    Please provide some solution so that my app also works on windows server (IIS 10) without disabling any setting

    Currently, I am using Identity server 2

    Request and Response Headers on IIS10 (http2) 

    Request and response headers on IIS 8 (http 1.1)

    Thursday, June 6, 2019 7:21 AM

All replies

  • User-474980206 posted

    chrome and other browsers require SSL to use http2. so if you want to use http2, enable SSL.

    Thursday, June 6, 2019 3:30 PM
  • User-1839745221 posted

    Site is already working on http2 but when i enable require SSL site starts using http/1.1 and application work fine on http/1.1.

    Friday, June 7, 2019 5:10 AM
  • User-1839745221 posted

    I got the solution - may be it seems weird to you. 'Key' i am sending from client to server is in the request header.  

    So if you see Request header send to IIS8 have uppercase 'K' in key and in request header send ti IIS10 has lower case 'k' in key.

    Don't know why how 'Key' is converted to 'key'. 

    Friday, June 7, 2019 5:16 AM