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
0
votes
0 answers

401 error when invoking asp.net service from c#

I've been stuck on this for quite a bit, I keep getting a 401 error when calling an asp.net web service from c# server side code. Web service is hosted on a remote server, I get its address from config file (Wrapper Service). Whenever I call it, I…
0
votes
1 answer

Rails controller error: "No Failure App Provided" when returning 401

In my controller I want to respond to an ajax request with an http 401 (unauthorized) error if the user is not logged in. However, the code below throws a 500 internal server error instead. Rails gives the error: "No Failure App Provided". If I…
alnafie
  • 10,558
  • 7
  • 28
  • 45
0
votes
1 answer

Jetty - Authentification HTTP - Double request

For REST web services, we set up the Jetty HTTP authentication. The problem is that each request sent with authentication is performed 2 times, then it is started once In each case, the first response is an HTTP 401 return, then the query is run…
user1450740
  • 731
  • 10
  • 26
0
votes
2 answers

401 error from Twitter Stream API using C#

I get 401 when i tried to convert it for the stream api: "https://stream.twitter.com/1/statuses/filter.json". I will really appreciate any help. See code below: HttpWebRequest request = null; string oauth_consumer_key =…
0
votes
0 answers

IIS 7 HTTP Error 401.3 on one file but ok on another

I have 2 file in an IIS virtual directory b1.html // shows up ok when I browse to http://localhost/bob/bs2/b1.html b2.html // gives 401.3 error when I browse to http://localhost/bob/bs2/b2.html contents of both files are the same "bob" running…
godzilla
  • 971
  • 1
  • 10
  • 18
0
votes
2 answers

C# Windows Store App HTTPClient with Basic Authentication leads to 401 "Unauthorized"

I am trying to send a HTTP GET request to a service secured with BASIC authentication and https. If I use the RESTClient Firefox plugin to do so there is no problem. I am defining the basic-header and sending the GET to the url and I am getting the…
0
votes
2 answers

Can't access webpage using Internet explorer

I have a problem accessing an intranet website with IE8. I can access the site through Firefox or any other browser, except IE. IE will prompt for a username and password but never accepts the credentials and just shows a 401 message, "You are not…
user23048345
  • 3,033
  • 7
  • 31
  • 31
0
votes
1 answer

Do I need to investigate HTTP 401 cached by Fiddler during the HttpWebRequest post to ASP.NET WebApi server

I am totally new to WebApi and WebRequests and other things. After hours of googling, finally, I managed to do POST using C# and HttpWebRequest. When I do HttpWebRequest in debug mode using Visual Studio I do not get any exceptions. My app work as I…
adopilot
  • 4,340
  • 12
  • 65
  • 92
0
votes
1 answer

Redirect 401 "authorization required page" to custom page

Is there a simple way I can encode a front-end php redirect to a custom page upon error? I have a page in a directory protected by an .htaccess password, but if you cancel the system dialog or enter the wrong details, you get a plain html message in…
annoyingnewbie
  • 153
  • 1
  • 3
  • 12
0
votes
1 answer

Issue with accessing data from external url- jsonp/json approach not working

I have this below code where I am trying to retrieve data from external url. I am getting 401- unauthorized access error when I try to do this. Please Advice