a 401 is a not authorized error. as we know nothing about your website technology, hard to say more.
Why do I get "This page isn't working right now" HTTP ERROR 401 when trying to connect to localhost?
I am running:
Edition Windows 11 Pro
Version 22H2
Installed on 10/7/2022
OS build 22621.900
Experience Windows Feature Experience Pack 1000.22638.1000.0
IIS 10.0 Express is installed.
When I click on "Browse localhost on *:80 (http)" I get the above error message.
Restarting the website does not fix the problem.
Any ideas what may be causing the problem?
6 answers
Sort by: Most helpful
-
-
Krishnaramanan 1 Reputation point
2022-12-10T15:42:35.397+00:00 401 Unauthorized response status code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource. 401 response is sent through the WWW-Authenticate header, which appears as “WWW-Authenticate: <type> realm=<realm>”. It includes ‘challenges’, or strings of data that indicate what type of authentication is required in order for access to be granted. you’ll want to check and see if the header response was sent, and more specifically, what authentication scheme was used. At the very least, this can help narrow down the cause of the problem, and bring you one step closer to a solution. To do this, go to the web page that’s displaying the 401 error, and access the developer console in Chrome. You can right-click on the page and select Inspect, or use Ctrl+Shift+J. Next, click on the Network tab and reload the page. This will generate a list of resources. Select the Status header to sort the table and locate the 401 status code
Select that entry, and then click on the Headers tab. Under Response Headers, locate the WWW-Authenticate header.
The information that is present in the response header, particularly the authentication schemes, can give you more information about what’s happening and point you towards a solution. It can help you understand what type of authentication the server is expecting. For example, in the above example, we can see that the authentication scheme is “Basic”. This means the authentication request should only require an ID and password.
-
Yurong Dai-MSFT 2,821 Reputation points Microsoft Vendor
2022-12-12T08:06:51.55+00:00 Hi @Anonymous ,
Did you receive the error page prompting this:
This page isn't working.
If the problem continues, contact the site owner.
HTTP ERROR 401.This error typically occur on websites that require a login to access. One of the most common reasons you might encounter a 401 error is that your browser's cache and cookies have expired, preventing authorization from being successful. If your browser is not using valid authentication credentials (or none at all), the server will reject the request. I suggest you try clearing your browser's cache first.
Apart from this, this error is caused by a plugin incompatibility or error. For example, a firewall or security plugin may mistake your login attempt for malicious activity and return a 401 error to protect the page. So disable plugins as well as firewall and try reloading the page that returns the 401 error to see if that fixes the problem. If the error goes away, you can manually activate each plugin in turn to determine which plugin is causing the problem. You can then remove that plugin, replace it with a new one, or contact its developer for assistance.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.Best regards,
Yurong Dai -
Fred Schmid 6 Reputation points
2022-12-21T15:03:57.28+00:00 I don't understand. The answers I'm getting sound like I am trying to access some unknown website. I'm trying to access the default website on my PC that IIS creates when installed on a PC. I would think there would not be any authentication since it is a sample website. I'm thinking it is some configuration that got screwed up when I installed IIS. When I try to access 127.0.0.1 I get this error: Not Found HTTP Error 404. The requested resource is not found.
What I am expecting to see is this:
-
Fred Schmid 6 Reputation points
2023-06-15T01:38:33.3933333+00:00 After reformatting my hard drive and reinstalling Windows the problem has been resolved. There must have been corrupted files in my Windows OS which the Windows tools DISM and SFC can't fix. I did not have any restore points. Now I have learned my lesson and have been making restore points.
Fred