Web API has been created in .Net with Windows Authentication. When am invoking the API in React APP getting 401 Unauthorized. Web API Works fine in the browser with windows authentication.
axios.get('http://.../.../user/Data')
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});```
With fetch
I set the credentials: include
option. Also, I think the Access-Control-Allow-Credentials
header needed to be set on the back-end.
I'm a front-end developer so I'm not sure what all went into configuring the back-end for Windows Authentication.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With