【PC】localhostに繋がらない

会社で使っているアプリケーションが、いきなり「localhostが見つかりません」というエラーを出して、使えなくなっててIPアドレスを「127.0.0.1」に指定してやれば繋がるという症状に見舞われていたのですが、ようやく解決方法がわかった(教えてもらった。)ので、そのメモ書き。

原因は3月10日に配布が始まったWindows UpdateのWindows Defenderのアップデート(KB915597)が、hostsファイルの「127.0.0.1 localhost」を削除してしまうことにより、名前解決がされなくなったようです。

ということで、「127.0.0.1 localhost」の1行をhostsに追加してやれば問題なく繋がるようになりました。

hostsファイルの場所
C:\Windows\System32\drivers\etc

# Copyright (c) 1993-2006 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
::1             localhost  
#↑こっちはIPv6用の設定
127.0.0.1 localhost
# ↑この行を追加

しかし、Microsoftも何を考えてんだか・・・・・?
とりあえず、同じ症状の人はお試しください。でも、自己責任でお願いします!!