相关疑难解决方法(0)

ASP.NET 5将应用程序添加为IIS应用程序

我正在将一些应用程序从ASP.NET 5 beta7迁移到RC1.使用HTTPPlatformHandler我可以运行任何这些ASP.NET 5 RC1应用程序作为IIS站点的根目录.但它们不会作为网站的子目录(右键单击"添加应用程序")运行.完整的回复显示:

HTTP/1.1 404 Not Found
Content-Length: 0
Server: Kestrel
X-Powered-By: ASP.NET
Date: Tue, 24 Nov 2015 14:59:04 GMT
Run Code Online (Sandbox Code Playgroud)

这不是权限问题,因为当应用程序是站点的根目录并使用相同的应用程序池时,路由会成功提供.

应用程序池配置为"无托管代码"和集成管道.

root应用程序的web.config如下所示:

<configuration>
  <system.webServer>
    <handlers>
      <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
    </handlers>
    <httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout.log" startupTimeLimit="3600"></httpPlatform>
  </system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)

对于子应用程序,我必须删除httpplatformhandler处理程序以避免错误"无法添加类型为'add'的重复集合条目,并将唯一键属性'name'设置为'httpplatformhandler'".

现在我们必须使用kestrel/httpplatformhandler,是否可以在站点下作为应用程序运行?

iis-7.5 kestrel-http-server asp.net-core

4
推荐指数
1
解决办法
1540
查看次数