无法在 IE 或 Edge 中打开本地 IIS 站点 [英] Can't open local IIS site in IE or Edge

查看:33
本文介绍了无法在 IE 或 Edge 中打开本地 IIS 站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地设置了一个站点来对其进行开发,我已将其添加到 iis 并使用 url 编辑了我的主机文件(见下文).但是,当我浏览到 url 时,我只会收到嗯,我们无法访问此页面"消息.

I have a site set up locally to do development on it and I have added it to iis and edited my host file with the url (see below). However, when I browse to the url I only get the "hmm, we can't reach this page" message.

该站点在包括 ie 11 在内的所有其他浏览器中运行良好,所以我想知道是否有任何设置可以让本地站点在边缘运行.

The site works well in all other browsers including ie 11 so I was wondering if there are any settings to get local sites to work on edge.

我一直在搜索,只能找到这个 相关帖子,但接受的答案对我来说没有任何区别,因为该选项已经在我的边缘进行了检查.我也试过重新启动和刷新我的 dns,但都没有奏效.

I have been searching and could only find this related post, but the accepted answer on that makes no difference to me as the option is already checked on my edge. I have also tried the rebooting and flushing my dns but both didn't work.

我使用的是 windows 10 和 iis 版本 10 build 10240

I am using windows 10 and iis version 10 build 10240

主机文件

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost
127.0.0.1       localhost loopback     # tried with and without this as thought it may have something to do with the loopback option in edge
127.0.0.1       test.local
127.0.0.1       dev.local

我设法找到的其他链接 - 虽然没有解决方案,第二个似乎建议我们只使用 ie11:

Other links I have managed to find - no solutions though and the second one seems to suggest that we just use ie11:

为什么Microsoft Edge打开了一些本地网站,而其他网站却没有,其中域名路由到hosts文件中的127.0.0.1

https://social.technet.microsoft.com/Forums/en-US/246298d8-52c1-4440-8d7f-05329d50e653/edge-browser-hosts-file?forum=win10itprogeneral

更新

这可能与站点应用程序池在我的工作帐户下运行而不是在 IIS 或网络服务下运行有关吗(我无法在后 2 个服务下运行,因为它们没有正确的权限来浏览某些文件夹)我的电脑)

Could it be something to do with the fact the site app pool is running under my work account instead of IIS or Network services (I cannot run under the latter 2 as they don't have the correct privileges to browse certain folders on my computer)

更新 2

对于任何尝试过以下所有方法的人.我发现这可能与我的 Windows 10 安装有关 - 我在机器上的第一次安装是 Windows 8.然后我将其升级到 8.1,然后升级到 10.

For anyone coming to this who has tried everything below. I have found out it may be something to do with my windows 10 installation - My first install on the machine was windows 8. I then upgraded this to 8.1 and the up to 10 when that came out.

遇到了其他一些问题,我硬着头皮重新安装了 Windows 10,瞧,一切都完美无缺!

Having had issues with a few other things, I bit the bullet and did a completely fresh install of windows 10 and voila, everything works perfectly!

可能有点激烈,但如果一切都失败了......

May be a bit drastic, but if all else fails...

更新 3

我最近买了一台新的工作机器,又遇到了这个问题,尝试了所有方法但仍然无法加载 - 结果是工作代理导致了问题,所以如果您尝试下面的所有内容并使用代理, 检查代理没有阻止它

I recently got a new work machine and had this problem all over again, tried everything but still couldn't get it to load - turns out that the work proxy was causing the issue so if you try everything below and have a proxy, check the proxy is not blocking it

推荐答案

作为 Windows 10 中的一项安全措施,网络正在阻止环回,您需要通过以提升的权限为 IE Edge 运行此命令来破例

The network is blocking loopback as a security measure in Windows 10, you need to make an exception by running this command for IE Edge in elevated privileges

CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"

CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"

这篇关于无法在 IE 或 Edge 中打开本地 IIS 站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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