I am running an ASP.NET 4 app in IIS using NTLM (Windows) Authentication. All other authentication schemes are disabled. I am able to authenticate to the server successfully. However, even after successfully authenticating, the server (under certain circumstances explained below) still returns a 401 Unauthorized error when I request Javascript files. Why am I unauthorized to download JS files?
Granted, I don't completely understand how NTLM works, but I expect something like the following to happen when I request a protected resource:
- I make a request to localhost:444 (yes, this is the correct port)
- I am not authenticated, so IIS returns a 401 to my web browser.
- My web browser understands that it must provide me with a popup in which to enter my username and password. I do so.
- The browser and IIS perform the NTLM auth flow. (tbh, I don't know the details of this.) Authentication is successful. The browser understands to re-request my original request from Step 1.
- IIS returns index.html.
- Index.html references a CSS file and some JS files. The browser requests these files.
- IIS returns these files.
This desired functionality is working... usually. When I'm accessing the site from Firefox, or Chrome 78, or Chrome 83, everything works as expected. However, when I access the site using Chrome 70, the following happens instead:
- Steps 1 thru 5 work correctly as explained above.
- Index.html references a CSS file and some JS files. The browser requests these files.
- IIS returns the CSS file, but returns a 401 error for the JS file.
Then however, when I turned on Fiddler (and configured it to decrypt https, because I've been using https) Chrome 70 started behaving correctly, just like Firefox and Chrome 78 and Chrome 83 are. I turned Fiddler off again, and I got the same error (on my JS file) again.
Does anyone have any idea what the issue is?
Thanks!