【发布时间】:2016-03-29 15:43:28
【问题描述】:
我有一个 ASP.NET 5 应用程序,在 dnx-clr-win-x64.1.0.0-rc1-update1 下发布。
我按照this article 将其部署到 IIS 8.5。
当我使用 web.cmd 手动运行它时 - 它可以工作。
但是当我在 IIS 下运行它时,它会发出 HTTP 404 (Not Found)。
这可能是什么原因?
This is the IIS setup我正在使用。
这是 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"
]
}
【问题讨论】:
-
我也有同样的问题。
-
@Fanda 看看我的回答..
标签: c# iis asp.net-core