asp.net 永远等待本地主机 [英] asp.net waiting for localhost forever

查看:18
本文介绍了asp.net 永远等待本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天早上突然我打开了我的电脑并启动了visual studio......无论我尝试了什么,无论我是运行还是调试,无论浏览器是什么(chrome/firefox/IE 11),它都在永远等待本地主机.

Suddenly this morning I turned on my computer and launched visual studio... And no matter what I tried and whether I run or debug, and whatever the browser is ( chrome / firefox / IE 11 ) it is waiting for localhost forever.

如果我将它部署到 azure,只需签入(持续集成)它就像一个魅力

If I deploy it to azure, by just checking in ( continuous integration ) it works like a charm

我都读过:

在我写的时候,它已经等待 localhost 超过 15 分钟了.我重新启动了 VS,甚至重新启动了计算机……尝试在 Firefox 上禁用 ipv6 的东西……等等

As I write, it has been waiting for localhost for more than 15mins. I restarted VS, even rebooted the computer... tried the ipv6 disable stuff on firefox...etc

我注意到(不知道它是否有用)将 localhost 替换为 127.0.0.1 会抛出:

I noted ( do not know if it is useful ) that Replacing localhost by 127.0.0.1 throws:

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

还有我的 C:WindowsSystem32driversetchosts(不变)

also my C:WindowsSystem32driversetchosts ( unchanged )

# 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

知道吗?我在 3 小时内无法显示单个本地主机页面.

Any idea ? I've not been able to show a single localhost page in 3hours.

推荐答案

检查防火墙是否有阻塞的端口,将应用程序的动态端口更改为某个固定端口.

Check firewall for blocked ports, change dynamic ports of application to some fixed port.

这篇关于asp.net 永远等待本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆