http-status-code-401
Unable to get windows authentication to work through local IIS
You have to whitelist a domain specified in the hosts file in order for windows authentication to work: Click Start, click Run, type regedit, and then click OK. In Registry Editor, locate the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters Right-click Parameters, click New, and then click DWORD (32-bit) Value. Type DisableStrictNameChecking and press ENTER. Double-click the DisableStrictNameChecking … Read more
401 instead of 403 with Spring Boot 2
Heads up By default Spring Boot 2 will return 401 when spring-boot-starter-security is added as a dependency and an unauthorized request is performed. This may change if you place some custom configurations to modify the security mechanism behavior. If that’s the case and you truly need to force the 401 status, then read the below … Read more
How do I get the HTTP status code with jQuery?
this is possible with jQuery $.ajax() method $.ajax(serverUrl, { type: OutageViewModel.Id() == 0 ? “POST” : “PUT”, data: dataToSave, statusCode: { 200: function (response) { alert(‘1’); AfterSavedAll(); }, 201: function (response) { alert(‘1’); AfterSavedAll(); }, 400: function (response) { alert(‘1’); bootbox.alert(‘<span style=”color:Red;”>Error While Saving Outage Entry Please Check</span>’, function () { }); }, 404: function … Read more
403 Forbidden vs 401 Unauthorized HTTP responses
A clear explanation from Daniel Irvine: There’s a problem with 401 Unauthorized, the HTTP status code for authentication errors. And that’s just it: it’s for authentication, not authorization. Receiving a 401 response is the server telling you, “you aren’t authenticated–either not authenticated at all or authenticated incorrectly–but please reauthenticate and try again.” To help you … Read more