Solution 127.0.0.1 (localhost) requires a user name and password, prompting that the user cannot access and has no permission Solution

Source: Internet
Author: User

Generally, you can enter
Http: // localhost/
Http: // local computer name
Http: // 127.0.0.1/

When you enter http: // 127.0.0.1/, the user name and password are usually required for the machine to enter. There are two situations:

One is newly created IIS. In order to test IIS, access is the iisstart under "System Disk \ Inetpub \ wwwroot. ASP, followed by iisstart. ASP jumps to localstart again. ASP, and enable IISHelp at the same time. "Localhost" and "computer name" are all correct. However, when you enter 127.0.0.1, the dialog box is displayed, and you need to enter your account and password.

In the second case, a virtual directory is created, which can be accessed through "localhost + virtual directory" and "computer name + virtual directory". Similarly, "127.0.0.1 + virtual directory" cannot be accessed.

 

Although they are the same symptoms, they are different.

First, we should throw the first general rule: to make the input http: // 127.0.0.1/accessible, whether direct access or virtual directory, you must ensure that the "Anonymous Access" is enabled.

Now we can quickly solve the second problem, such as the operation: Open IIS, right-click the "Default site", select "properties" from the pop-up menu, and open the panel, select "Directory Security" and click "edit". If you do not select "Anonymous Access", select "OK" to solve the problem.

Access "127.0.0.1 + virtual directory". solution 2

 

However, this problem involves a small number of people, and it is not a case to simply select it. Let's look at it again.

In this case, even though 127.0.0.1 does not have the required password input dialog box, a new problem occurs. Similarly, entering http: // localhost/at the moment is the same, this is what many people have reported.

Error Type:
Microsoft VBScript runtime error (0x800a0046)
No permission: 'getobject'
/Localstart. asp, row 40th

 

So stop here now and analyze the cause.

If there is no "Anonymous Access" at first, you need to provide the account password. If there is "Anonymous Access", an error occurs. Note! This is for direct access to 127.0.0.1.

Therefore, "Anonymous Access" is the account and password provided to solve the problem of "127.0.0.1 + virtual directory, of course, it also solves some problems of direct "127.0.0.1" Access (no account password is required)

This "Anonymous Account" is useful.

But now we need to solve this new problem: the Microsoft VBScript runtime error (0x800a0046) has no permission: 'getobject'

Generally, the following methods are provided: Separate "iisstart. asp" and "localstart. asp" to cancel "anonymous access"

Wait. It looks good. I didn't typo it.

To solve the problem of "(0x800a0046) No permission: 'getobject'", the solution is to "separately" cancel "Anonymous Access" for these two files"

Procedure: Select "localstart. ASP file, right-click the file, select "properties" from the pop-up menu, open the panel, select "file security" for "edit", and cancel the selection before "Anonymous Access" access.

 

The same operation procedure applies to "iisstart. asp.

Now "http: // localhost" can be accessed, solving the problem of Microsoft VBScript runtime error (0x800a0046) having no permission: 'getobject.

At this point, we will analyze:

1. To make 127.0.0.1 accessible, you must set "anonymous access"
2. To enable "iisstart. asp" and "localstart. asp" to access the service properly, you must separately disable "anonymous access"

After the above settings, the localhost, localhost + virtual directory, and 127.0.0.1 + virtual directory can be accessed normally, leaving alone 127.0.0.1 access. The above analysis seems to be in conflict.

So, let's see what this "Anonymous Access" is?

The username is "bluecom \ iusr_bluecom", and the password is controlled by IIS. Among them, "bluecom" is the "computer name" of my machine, and each person is different. Then "iusr_bluecom" is "IUSR _ computer name.

What is the "IUSR _ computer name? It is an "Internet Guest Account" and an "built-in account for anonymous access to IIS". It belongs to the "guests" group.

When using this account, localhost displays "(0x800a0046) No permission", which seems to be related.

 

Then, my final perfect solution is to use "anonymous access" to ensure that all pages can be accessed without a password input box. At the same time, replace the "Anonymous Access" account. Instead of using the "IUSR _ computer name" account, use my XP Administrator to log on to the account.

Start IIS and right-click the "Default site". Select "properties" in the pop-up menu, open the panel, and select "Directory Security:

1. "edit"
2. "Browse" Users
3. "advanced"
4. "query" Users
5. Select the local XP Logon User Name
6. "OK", always "OK" to the end

 

In addition, it is important to select "inherit overwrite" two files "iisstart. ASP and localstart. ASP. Otherwise, you need to add the "Anonymous Access" of the two files separately, and add the account to the XP login account you just set.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.