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
1 answer

Using HTTPWebRequest to get SSRS report: Error 401

Hello fellow developers, I currently have a task to make a Bulk Report Exporter. My thinking is that I have to create a loop for each set of parameters, and pull the report with an HTTPWebRequest and Response, and save each to a file. I have tried…
0
votes
1 answer

file_get_contents authentication gives '401 Access Denied Error'

I am trying to create a database in cpanel using the folowing comment $result =file_get_contents("http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/sql/adddb.html?db=$db_name") echo $result; this command gives me HTTP…
Sanjay
  • 51
  • 3
  • 6
0
votes
2 answers

"The remote server returned an error: (401) Unauthorized" error when trying to upload a file

I found a lot of question about (401) Unauthorized error, but none of them explained to me how to diagnose the issue. I created a new MVC ASP.net app to learn how to upload a file to a sharepoint folder. As of right now, I can't seem to be able to…
Ammar
  • 1,068
  • 2
  • 13
  • 20
0
votes
1 answer

Authentication Errors Trying to Access to the Google Analytics API via http (not using oAuth)

I'm trying to build a simple script to import page view counts for articles published via my CMS. I easily constructed my query using the Google Analytics API query builder which quickly returns the desired result. A scheduled job on my web server…
Kris
  • 407
  • 1
  • 5
  • 9
0
votes
2 answers

php fread a url with htaccess password?

$handle = fopen(site_url() . "/?post_type=tab_content&p=$content_id&_parent_id=$parent_id&_page_id=$page_id", "r"); $contents = fread($handle, filesize($filename)); fclose($handle); gives me: Warning:…
Jacksonkr
  • 31,583
  • 39
  • 180
  • 284
0
votes
1 answer

Need help understanding an issue with IIS, IWA, and maybe kerberos

At work, I have IE8 on XP, calling a .net 4.0 web app on WinServer 2003 with IIS6. IWA is turned on. When I call the page, the initial aspx page call of course will show 3 lines in Fiddler. First is anon request, second has some…
0
votes
2 answers

ASP.NET WebMethod that works both with and without a Session

I am making a ASP.NET web page in C#. I'm finding that if the web page is left alone for a short period of time, I start getting 401 Unauthorized Errors whenever the page attempts to call a WebMethod. I think this is probably caused by the Session…
0
votes
3 answers

IIS 6.0 Is Stubbornly Remembering Authentication Settings

I have an .asmx in a folder in my application and I keep getting a 401 trying to access it. I have double and triple checked the setting including the directory security settings. It allows anonymous. I turned off Windows Authentication. If I…
BlackMael
  • 3,198
  • 5
  • 25
  • 42
0
votes
1 answer

WCF web service IIS6 401 unauthorized error when calling from another WCF service. Calling from asmx/WinForms is OK

I have a WCF service hosted in IIS6. It is doing simple WebRequest. When I call it from ASMX service(Hosted in the same IIS6). Everything is working great. When I call it from WinForms application. Everything is also working as expected. The problem…
Tanel
  • 314
  • 2
  • 10
0
votes
1 answer

ItextSharp 401 error (Image issue)

I'm having some trouble using iTextSharp in MVC3. I am creating a header/footer with some images and it works fine locally but when i upload it to my server it returns a 401: The remote server returned an error: (401) Unauthorized. …
Lex Eichner
  • 1,056
  • 3
  • 10
  • 35
0
votes
1 answer

Forcing a custom HTTP 401 unauthorized page in ASP.NET

I've written a web application for internal use at work (not for the wider internet) that makes use of Windows authentication - ASP.NET interrogating Windows for the current set of credentials. An authentication method called from the Page_PreInit…
Chris B
  • 709
  • 2
  • 14
  • 32
-1
votes
1 answer

I am having issues logging into Amadeus self service - I created 2 or more account but same issue cannot login

Every time I enter credentials it loads and then get no authorisation message followed by thi space does not exist. screenshot of issue I have changed password successful, created new accounts but can't login. be presented with profile
-1
votes
1 answer

Requests coming back as 401 unauthorized

I recently asked a question very similar to this one but instead of 401 the error I was getting was 403 (Forbbiden), but I changed the entire code so I decided to post a new one specific to this code and this problem. I'm trying to create an user…
vitoriac
  • 79
  • 1
  • 1
  • 7
-1
votes
1 answer

Python web-scraping: error 401 You must provide a http header

Before I start let me point out that I have almost no clue wtf I'm doing. Like imagine a cat that tries to do some coding. I try to write some Python code using Pycharm on Ubuntu 22.04.1 LTS and also used Insomnia if this makes any difference. Here…
Peter
  • 1
  • 2
-1
votes
1 answer

I can push .Net Core C# nuget package to private github package registry but can't access it from other projects

I am using Visual Studio 2022 on Windows 11. I manage to authenticate and push a .Net Core C# package to private gthub package registry but when I try to browse and install that same package from the same private registry in another VS 2022…