我有一个 ASP.NET 5 应用程序,发布于dnx-clr-win-x64.1.0.0-rc1-update1.
我跟着本文 http://docs.asp.net/en/latest/publishing/iis.html将其部署到 IIS 8.5。
当我使用 web.cmd 手动运行它时 - 它有效。
但是当我在 IIS 下运行它时,它会发出HTTP 404(未找到).
可能是什么原因造成的?
这是IIS设置 https://i.stack.imgur.com/FNBDR.png我在用。
这是 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>
和project.json:
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Mvc.Core": "6.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
"Nummularii.Common.dll": "1.0.0"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnx451": {
"dependencies": {
"Admin.Common": "1.0.0-*"
},
"frameworkAssemblies": {
"System.ServiceModel": "4.0.0.0"
}
}
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"scripts": {
"prepublish": [ "npm install", "bower install" ],
"prepare": "gulp"
},
"publishExclude": [
"**.user",
"**.vspscc"
]
}
这有点遥远,但我想知道作为项目路径一部分的任何目录名称中是否有空格?在 RC1 中,这可能会阻止 IIS Express 运行 Web 应用程序。可能还有 IIS。在错误报告链的某些级别,这看起来像文件未找到错误。然而,在其他级别,它显示为“尝试确定托管应用程序的 DNX 进程的进程 ID 时发生错误”。
正如我所说,这有点不太可能,因为这可能不是你的问题,但我认为值得一提,因为它可能是。
有关更多详细信息,请参阅此 github 问题:https://github.com/aspnet/Home/issues/1194 https://github.com/aspnet/Home/issues/1194
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)