I have created a new ASP.NET Web Application
-> Web API 2 project with Windows Authentication. This works fine in IIS Express but to get hot reloading for my React front end I have tried to use webpack-dev-server
and have it proxy my IIS Express. I have used this before both with cookie authentication and token (Bearer) authentication without a problem but with Windows Authentication (NTLM Authentication) it does not work.
Looking at the response from the server I get the expected 401 Unauthorized (401.2)
response with the header www-authenticate: Negotiate, NTLM
as expected but I don't think the client re-sends the request with Authorization: NTLM
.
Browsers that I have tried with (Chrome, Firefox and IE) does not give me the normal prompt to enter correct credentials either.
https://blogs.msdn.microsoft.com/chiranth/2013/09/20/ntlm-want-to-know-how-it-works/
My settings in webpack.config.js looks like this:
var proxy = 'localhost:57263';
devServer: {
proxy: {
'*': {
target: 'http://' + proxy,
changeOrigin: true,
},
port: 8080,
host: '0.0.0.0',
hot: true,
},
}