windows 无法连接到运行 IIS 的服务器上的本地主机
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43638910/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot connect to Localhost on server running IIS
提问by Stan
I recently installed IIS on a Windows 2012 R2 server and can't seem to connect to localhost, the IP, server DNS, etc. I've tried the following and nothing seems to be helping:
我最近在 Windows 2012 R2 服务器上安装了 IIS,但似乎无法连接到本地主机、IP、服务器 DNS 等。我尝试了以下操作,但似乎没有任何帮助:
- In CMD run netstat -ano to check that port :80 is listening (it is)
- Bound the site to All Unassigned and the IP address on port 80 (no hostname)
- Adjusting the security permissions on the wwwroot folder to confirm that IIS_IUSRS has access and tried adding IUSR
- Changed the Application Pool settings for Load User Profile from False to True
- Edit the hosts file to add the line
127.0.0.1 localhost
- Ensured that Anonymous Authentication is enabled and no others are enabled
- Temporarily disable the MacAfee running on the machine
- 在 CMD 中运行 netstat -ano 检查端口 :80 是否正在侦听(它是)
- 将站点绑定到 All Unassigned 和端口 80 上的 IP 地址(无主机名)
- 调整wwwroot文件夹的安全权限,确认IIS_IUSRS有访问权限,尝试添加IUSR
- 将加载用户配置文件的应用程序池设置从 False 更改为 True
- 编辑主机文件以添加行
127.0.0.1 localhost
- 确保启用了匿名身份验证并且没有启用其他身份验证
- 暂时禁用机器上运行的 MacAfee
Not sure what else to try or where it might be failing here.
不知道还有什么可以尝试的,或者在这里可能会失败。
采纳答案by Stan
Turns out I needed to grant permission to the Application Pool that the application was using. The Application Pool's identity was NetworkService, so as so as I granted Network Service read/execute permissions I was able to navigate to the site.
结果我需要向应用程序使用的应用程序池授予权限。应用程序池的身份是 NetworkService,因此当我授予网络服务读取/执行权限时,我能够导航到该站点。
回答by Lauri Peltonen
I was struggling with a similar problem - I didn't have any connections and couldn't connect to even localhost with IIS.
我遇到了类似的问题 - 我没有任何连接,甚至无法使用 IIS 连接到本地主机。
Turns out I had forgotten to open IIS as an administrator. That fixed the problem.
原来我忘记以管理员身份打开 IIS。这解决了问题。
回答by Hanan Ohayon
You will need to Regiis your .Net
.
您将需要注册您的.Net
.
Open CMD and browse to:
打开 CMD 并浏览到:
"%windir%\Microsoft.NET\Framework64\v4.0.30319"
Then run the following command: "aspnet_regiis -ir"
然后运行以下命令: "aspnet_regiis -ir"