SQL Server 2017 Express Edition:localhost 和 127.0.0.1 不相同

SQL Server 2017 Express Edition:localhost 和 127.0.0.1 不相同

我需要安装并使用 SQL Server 2017 Express Edition。

我从这个链接下载了它:Microsoft® SQL Server® 2017 Express并安装基本版本到C:\Program Files\Microsoft SQL Server

我可以运行它并可以访问http://localhost,但我应该使用http://127.0.0.1。当我使用http://127.0.0.1.我看到以下内容:

Bad Request - Invalid Hostname
HTTP Error 400. The request hostname is invalid.

我尝试编辑我的hosts。我转到C:\Windows\System32\drivers\etc,打开hosts并取消注释以下行:127.0.0.1 localhost

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
     127.0.0.1       localhost
#    ::1             localhost

但它没有效果。我可以访问localhost,但无法访问127.0.0.1。错误的请求。

我尝试重新启动。

我错过了什么?

Windows 10 Pro 64    
Visual Studio 2017
SQL Server 2017 Express Edition 14.0.1000.169, RTM

IIS 屏幕。(站点名称、URL 地址、标识符)

相关内容