Questions tagged [http-status-code-401]

Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.

The request has not been applied because it lacks valid authentication credentials for the target resource.

The server generating a 401 response MUST send a WWW-Authenticate header field1 containing at least one challenge applicable to the target resource.

If the request included authentication credentials, then the 401 response indicates that authorization has been refused for those credentials. The user agent MAY repeat the request with a new or replaced Authorization header field2. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user agent SHOULD present the enclosed representation to the user, since it usually contains relevant diagnostic information.

See

1109 questions
4
votes
1 answer

Get 401 Unauthorized when call web api even if I enable Anonymous Authentication

I am developing a web api. When I ran web api in local workstation by Visual Studio and used Fiddler or IE to consume it, all things were fine. But if I deployed it into a remote IIS server, I get 401 error code in IE, Fiddler or client…
KyL
  • 987
  • 12
  • 24
4
votes
1 answer

custom 401 page in Rails with Doorkeeper

I have a Rails 4 application using Doorkeeper to require authentication in most controllers. When I go to one of those restricted routes, I see a blank page. I notice in my terminal, Puma says: Filter chain halted as…
Sarah Vessels
  • 30,930
  • 33
  • 155
  • 222
4
votes
1 answer

How to return a 401 response and custom page?

Using an MVC4 application that uses .NET 4.5 and IIS 8. Is there a way to return a custom unauthorised page AND a 401 result, when a permission check fails? I am also using Forms authentication and want a redirect to the login page when a user isn't…
DevDave
  • 6,700
  • 12
  • 65
  • 99
4
votes
1 answer

FOSOAuthServerBundle + HWIOAuthBundle Timeout after a hour 401

I'm user HWIOAuthBundle (let's call it MyClient) to connect to a Symfony 2.3.2 OAuth 2 server using FOSOAuthServerBundle (let's call it MyServer). I am able to connect and login and do the requests that I need to but I keep getting booted out of…
4
votes
1 answer

401 Unauthorized access for Github API using HttpBuilder (Groovy)

I wrote a Groovy script to manage some organization repos on Github. It was working great until several weeks ago, when the same script started failing. Maybe Github changed some aspect of their API? Or maybe I'm doing something stupid. I've…
4
votes
3 answers

The remote server returned an error: (401) Unauthorized in Zendesk

I have to access a page from the zendesk.com from my MVC application. I have username and authenticate ticket. When I try to access that page it is returning the error "The remote server returned an error: (401) Unauthorized". Here is the code for…
Pankaj Saha
  • 869
  • 3
  • 17
  • 37
4
votes
1 answer

Send BASIC auth by default, rather than wait for HTTP 401

I have a web service that requires a BASIC authentication header to be present in the request, or the service will return an HTTP 401 (unauthorized). This works - when the challenge comes back, the browser (in this case, Chrome) pops up and asks…
theMayer
  • 15,456
  • 7
  • 58
  • 90
4
votes
2 answers

IE 10 HTTP 401 Error on ajax POST

I've been chasing down an issue and decided to make the most basic reproduction of the issue possible in hopes that a simplified question will help me resolve this. I am receiving a 401 when posting to a web service via ajax in javascript. I will…
jon3laze
  • 3,188
  • 6
  • 36
  • 69
4
votes
2 answers

Problems with external visibility of Flask web-server

I have managed to to install flask and run the hello-world script: from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run() I was impressed how easy it…
Roman
  • 124,451
  • 167
  • 349
  • 456
4
votes
2 answers

HTTP Response Code for Proxy Authorization Failure

What should be the HTTP response code for Proxy Authorization failure? I know that 407 is the response code for requesting Proxy Authorization. But, once the clients sends the authentication info to the proxy and if it is incorrect, the what should…
4
votes
4 answers

DNN or IIS 401 Unauthorized error and some failed attempts to diagnose

I'm doing a first time install of DNN, following the tutorials at dotnetnuke.com, and I keep getting stuck. I have Windows 8 so I'm having trouble getting answers from Google, so here's my problem... When I launch the install wizard for dnn it…
NominalAeon
  • 593
  • 5
  • 23
4
votes
1 answer

urllib2.HTTPError: HTTP Error 401 while querying using the new Bing API ( in azure marketplace )

So, I ve made corrections based on most of the answers under the same roof in stack overflow, I'm still unable to resolve this problem. queryBingFor = "Google Fibre" quoted_query = urllib.quote(queryBingFor) account_key =…
madCode
  • 3,733
  • 5
  • 26
  • 31
4
votes
2 answers

How to update status on twitter using C# and LINQ to Twitter library

I am writing an Metrol Style App to update status on my Twitter. I use LINQ to Twitter library. But I don't understand why my app throws exception 401 Unauthorized. Here is my code: private void UpdateStatus() { // configure the OAuth object …
4
votes
3 answers

Intermittent 401 and 302 Errors on Static Files

I'm developing a website for a client of ours and have been having a nagging issue for weeks. The problem is intermittent and might happen twice in a day or once in 2 weeks. When it happens, the client will start getting 401.3 "Unauthorized" errors…
4
votes
3 answers

Classic ASP suddenly giving me permissions (401.3) error

Background: I support a classic ASP environment. I have a development setup locally on my machine as part of that support. I am running IIS7. To access my environment, I use "http://localhost:99999/" (port # faked for privacy purposes). I have…
Ray K.
  • 2,431
  • 3
  • 25
  • 39