在IIS 8.0上启用ASP.NET(现有服务器上的新网站)

我已经在现有的Windows Server 2012 IIS安装上添加了一个新的网站。 安装已经在现有的网站上configuration了ASP.NET。

什么是在新的网站上启用ASP.NET的正确方法? 我find的所有文档都谈到了使用服务器pipe理器来添加angular色/function,但这已经在那里,所以这没有什么帮助。

在以前的版本中,我会使用aspnet_regiis -i但是在Server 2012上不起作用:

 C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929 Administration utility to install and uninstall ASP.NET on the local machine. Copyright (C) Microsoft Corporation. All rights reserved. Start installing ASP.NET (4.0.30319.17929). This option is not supported on this version of the operating system. Administr ators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Win dows Features On/Off" dialog, the Server Manager management tool, or the dism.e xe command line tool. For more details please see http://go.microsoft.com/fwlin k/?LinkID=216771. Finished installing ASP.NET (4.0.30319.17929). 

什么是正确的程序?

编辑:这是一个截图,certificateangular色已正确configuration。

该机器正在另一个网站上正确运行ASP.NET应用程序,所以我知道angular色是100%正确安装。

  1. 打开IISpipe理器
  2. 展开服务器名称节点
  3. select“网站”
  4. 在“操作”部分,按“添加网站…”
  5. 设置“站点名称”,“物理path”和“绑定”,然后按“确定”。 请注意,IIS8中的DefaultAppPool适用于Asp.Net4

下一步为IIS8做窍门:

  1. 展开“默认网站” 。 你的网站名称应该在。

  2. 右键点击你的网站名称,然后按“转换到应用程序”

而已。 现在它应该工作。

我花了三个小时才发现,右键单击 – >转换为应用程序的东西…我希望这个答案会节省时间。

最后,我删除了已经安装的ASP.NET 3.5和4.5的function,然后把它们放回去(我必须重新启动WCF HTTP Activation)。 这使得新的网站工作,似乎已经保持了其他现有的ASP.NET网站和应用程序工作,虽然我不知道没有更多的testing。

这显然是一个非常愚蠢的解决scheme,因为它冒着破坏服务器上现有ASP.NET应用程序的风险,而且在这个过程中无疑是意味着这些应用程序的停机。 但它确实有效。

在服务器上安装IIS时,需要在第二步中selectfunction中的ASP.NET 4.5。 您必须在服务器上安装IIS时select所有function。 你可以浏览IIS安装 URL来了解更多。