http-status-code-401

Google Cloud Messaging, returning 401 Unauthorized

夙愿已清 提交于 2019-12-22 08:32:50
问题 I followed the example on https://developer.android.com/google/gcm/notifications.html#gen-client trying to create notification key from client. getAccounts() method did return a valid google account. GoogleAuthUtil.getToken(context, accountname, scope) also returns a valid scope string. However the response from the post on https://android.googleapis.com/gcm/googlenotification is 401, and is an html page: <HTML> <HEAD> <TITLE>Unauthorized</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"

SSRS Report Viewer + ASP.NET Credentials 401 Exception

主宰稳场 提交于 2019-12-20 14:07:29
问题 I have a report saved on a SQL2005 reporting server, and I want to return a rendered PDF of this report. I've figured this out when working with a local *.rdlc file (and I've blogged about it), but not when the *.rdl resides on a reporting server. I am getting a 401 Not Authorized error at the line... reportViewer.ServerReport.SetParameters(reportDefinition.ReportParameters); Here's the method used to render the report. public byte[] Render(IReportDefinition reportDefinition) { var

Using RoboSpice is there a way to get the HTTP Error Code out of an exception?

主宰稳场 提交于 2019-12-20 08:49:44
问题 I am writing an application that uses RoboSpice. In the request listener onRequestFailure( SpiceException arg0 ) is there a way to know for sure that the error was a result of a 401 HTTP Error occurred? I have a back end service, that returns a 401 error when a token expires, when that occurs I need to prompt the user to re-enter their credentials. Is there anyway to know that a 401 HTTP error specifically occurred? Below is an example of my request. public class LookupRequest extends

How to display HTTP 401 basic authentication dialog

点点圈 提交于 2019-12-19 11:49:24
问题 I am new to web development. I have Android application that hosts some web pages using HTTPServer. I am using Netty to decode/encode request/responses. Now, I want to display basic authentication dialog when someone navigates to the my webpage. Something like this: Can I get some pointers ? Is it something HTTP built in functionality, any RFC ? Do I need to write some java script ? Any help would be great. 回答1: You just need to send the appropriate headers when a client requests a resource

401 - Unauthorized in IE7 only with windows authentication.

夙愿已清 提交于 2019-12-18 16:57:45
问题 I've created an intranet site that uses windows authentication In chrome I can access the site instantly, and in FF it requires Active Directory login. But with IE7 I'm getting the following error: 401 - Unauthorized: Access is denied due to invalid credentials. You do not have permission to view this directory or page using the credentials that you supplied. Im unsure as to why its okay in other browsers but not IE? Any help appreciated. Thanks 回答1: Solution: IE is using Kerberos and not

Android: HttpsUrlConnection with Authenticator for Basic Authentication iterates forever when password is wrong (on 401 response)

南笙酒味 提交于 2019-12-18 13:11:08
问题 I am using an HttpsUrlConnection with Basic Authentication by using an Authenticator and setting a default Authenticator object like this: Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication("user", "userpass" .toCharArray()); } }); When I access my web-service the connection calls my getPasswordAuthentication() method to get the credentials and sends this to the web-server. This works allright as long

Access Exchange Web Services with PHP and cURL

走远了吗. 提交于 2019-12-18 11:53:50
问题 Hello, I am currently writing a client to access a Microsoft Exchange server and read contacts, appointments etc. from it. Through days of searching I've been able to connect to the EWS via PHP's Soap client and a custom HTTPS Stream wrapper. This website helped me greatly at this point. Everything worked fine on my Windows 7 machine using XAMPP Now I uploaded my project to a Debian 6.0 Squeeze development machine that has exactly the same configuration as my Windows machine regarding the web

Django login with wrong credentials returns 200 not 401

落花浮王杯 提交于 2019-12-18 05:12:28
问题 This is a pretty straight forward test, but I can't seem to get it right. I want to check which users can login and perform actions (it's part of a larger suite of tests), but the very first step causes some issues. class SuperUserTest(TestCase): def setUp(self): self.client = Client() self.su = User.objects.create_superuser('super','','the_correct_password') def test_su_can_login(self): response = self.client.post(reverse('django.contrib.auth.views.login'), {'username': 'super', 'password':

Google Drive Python API resumable upload error 401 after 2 hours

血红的双手。 提交于 2019-12-17 17:06:50
问题 First of all, I'm sorry if this is a too silly question... this is the first time I'm trying to use any of the technologies involved in this script (Python, the drive api, oauth 2.0, etc). I swear I've been searching and trying this for about a week before posting the question. hehehe I'm trying to use the google-api-python-client to upload a big file (3.5GiB) that is on a terminal only Linux Debian. I've had some success uploading small files, but when I try to upload the big file, the

jquery $.ajax call results in 401 unauthorized response when in Chrome or Firefox, but works in IE

心已入冬 提交于 2019-12-17 13:54:38
问题 I have a script running on a web page that needs to use the JQuery $.ajax method (currently using jquery 1.7.2) to submit several GET requests to a service endpoint on a different domain. I have the ajax call working in IE (9, 10, 11), but it fails with a 401 Unauthorized response in Firefox and Chrome. Part of the additional error message in Chrome is "Full authentication is required to access this resource". My ajax call is setup like this (dataType is "json" for these requests that fail,