简体   繁体   English

IIS8上未加载ASP.NET页面(Windows Server 2012)

[英]ASP.NET pages not loading on IIS8 (Windows Server 2012)

I am trying to set up my Windows Server 2012 to run an ASP.NET website. 我正在尝试设置我的Windows Server 2012以运行ASP.NET网站。 The website can serve html pages and .svc pages, but whenever I visit an .aspx page, it will simply time out. 该网站可以提供html页面和.svc页面,但每当我访问.aspx页面时,它只会超时。

Error 118 (net::ERR_CONNECTION_TIMED_OUT) 错误118(net :: ERR_CONNECTION_TIMED_OUT)

If I would at least get some sort of error description, I could go from there, but I just get a timeout message, as if the server is completely unavailable, so I am stuck with this problem. 如果我至少会得到某种错误描述,我可以从那里开始,但我只是得到一条超时消息,好像服务器完全不可用,所以我遇到了这个问题。

It seems the aspx pages are not loaded at all, since I've already tried drastic measures such as putting a "throw Exception" in the first line of Page_Load. 似乎aspx页面根本没有被加载,因为我已经尝试了一些激烈的措施,例如在Page_Load的第一行放置一个“throw Exception”。

If I create a new site and put just an aspx page in there, it executes fine. 如果我创建一个新站点并在其中放置一个aspx页面,它执行正常。

The Event Log is not showing anything in relation to this. 事件日志未显示与此相关的任何内容。

Does anyone have any suggestions? 有没有人有什么建议?

Creating a new web site in IIS8 and pointing to the same folder made it work. 在IIS8中创建一个新网站并指向同一个文件夹使其工作。 Now the site is working fine and running code as normal. 现在该网站正常运行并正常运行代码。

My guess is, that if I created the website before installing all needed features, they were not part of that site. 我的猜测是,如果我在安装所有需要的功能之前创建了网站,那么它们就不属于该网站。 Now, after installing a new site, it contains all the current features. 现在,在安装新站点后,它包含所有当前功能。

It doesn't make TOO much sense, though, as the server had ASP.NET 4.5 from installation (it's Windows Server 2012). 但是,由于服务器安装了ASP.NET 4.5(它是Windows Server 2012),因此它没有太大意义。

Open up the Web Platform Installer. 打开Web Platform Installer。

Now look for IIS: ASP.NET 4.5 and install that. 现在寻找IIS: ASP.NET 4.5并安装它。

I had the same problem as everyone else and nothing worked until I did that. 我遇到了和其他人一样的问题,直到我这样做才行。

There is a difference between installing dotNET on your computer/server and dotNET for IIS. 在您的计算机/服务器上安装dotNET和在IIS上安装dotNET之间存在差异。

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

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