简体   繁体   English

IIS7仅能够加载默认网站

[英]IIS7 only able to load Default Web Site

I'm trying to set up IIS to run websites instead of running them on VS Development Server. 我正在尝试将IIS设置为运行网站,而不是在VS Development Server上运行它们。 I've registered ASP.NET with IIS correctly (using this answer to make sure), added a new site with the correct physical path, binded an address (site1.com) and added it to the hosts file, but it's not working: it just shows that it's loading endlessly in Firefox. 我已经使用IIS正确注册了ASP.NET(使用此答案来确保),添加了具有正确物理路径的新站点,绑定了地址(site1.com)并将其添加到主机文件,但是它不起作用:它只是表明它正在Firefox中不断加载。

I'm able to ping site1.com and I get a reply. 我可以ping site1.com并得到回复。 I'm also able to load http://localhost/ and it shows the default IIS page. 我还可以加载http://localhost/ ,它显示了默认的IIS页面。 What could I be missing? 我可能会缺少什么?

edit: I've also checked "Use Local IIS Web server" in my project properties 编辑:我也在项目属性中选中了“使用本地IIS Web服务器”

As per your question, I assume you have 2 sites running (1_Default web site, 2_Site1.com) on your IIS. 根据您的问题,我假设您的IIS上有2个站点正在运行(1_Default网站,2_Site1.com)。

Suggest solution : Try to stop your default website and load site1.com in your browser. 建议解决方案:尝试停止您的默认网站,然后在浏览器中加载site1.com。

Go to site1.com > Right click go to Edit Bindings and set the port number to be 80. try going to site1.com. 转到site1.com>右键单击转到“编辑绑定”,并将端口号设置为80。尝试转到site1.com。

Cheers 干杯

I think the issue was multiple versions of IIS on one machine. 我认为问题是在一台计算机上存在多个版本的IIS。 After formatting the machine, everything works fine. 格式化机器后,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM