http-status-code-401

Avoiding 401 response for each request using NTLM

蓝咒 提交于 2019-11-27 00:10:10
问题 We have here an asp.net 3.5 application using NTLM based windows authentication. The system runs on a private network that actually distributed over different geographic places (connected via VPN). We are now trying to optimize the website's performance. Because the way NTLM works, every new request to the IIS is composed with 3 different requests while the first 2 is 401 responses. We are trying to minimize the amount of these requests to be only at the beginning of the session. We found

How do I get the HTTP status code with jQuery?

a 夏天 提交于 2019-11-26 21:57:46
I want to check if a page returns the status code 401. Is this possible? Here is my try, but it only returns 0. $.ajax({ url: "http://my-ip/test/test.php", data: {}, complete: function(xhr, statusText){ alert(xhr.status); } }); Ravi Mittal 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

HTTP Status Code: 401 in GCMDemo

时光总嘲笑我的痴心妄想 提交于 2019-11-26 21:19:37
问题 Reference:http://developer.android.com/google/gcm/demo.html Server 401 when trying to send a message to my android device. HTTP Status 500 - HTTP Status Code: 401 type Exception report message HTTP Status Code: 401 description The server encountered an internal error (HTTP Status Code: 401) that prevented it from fulfilling this request. exception com.google.android.gcm.server.InvalidRequestException: HTTP Status Code: 401 com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:177) com

Server returned HTTP response code: 401 for URL: https

拟墨画扇 提交于 2019-11-26 20:13:36
问题 I'm using Java to access a HTTPS site which returns the display in an XML format. I pass the login credentials in the URL itself. Here is the code snippet: DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); requestURL = "https://Administrator:Password@localhost:8443/abcd"; try { InputStream is = null; URL url = new URL(requestURL); InputStream xmlInputStream =new URL(requestURL).openConnection().getInputStream(); byte[]

How do I get the HTTP status code with jQuery?

[亡魂溺海] 提交于 2019-11-26 08:05:23
问题 I want to check if a page returns the status code 401. Is this possible? Here is my try, but it only returns 0. $.ajax({ url: \"http://my-ip/test/test.php\", data: {}, complete: function(xhr, statusText){ alert(xhr.status); } }); 回答1: 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();

403 Forbidden vs 401 Unauthorized HTTP responses

一曲冷凌霜 提交于 2019-11-25 21:57:40
问题 For a web page that exists, but for which a user that does not have sufficient privileges, (they are not logged in or do not belong to the proper user group), what is the proper HTTP response to serve? 401? 403? Something else? What I\'ve read on each so far isn\'t very clear on the difference between the two. What use cases are appropriate for each response? 回答1: A clear explanation from Daniel Irvine: There's a problem with 401 Unauthorized , the HTTP status code for authentication errors.