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 位址、識別碼)

相關內容