【发布时间】:2016-06-13 01:54:39
【问题描述】:
当我以 net451 或 net46 框架为目标时,我似乎无法将我的 asp.net core RC2 应用程序部署到 Azure。
当我尝试访问我的应用程序时,我收到以下错误
指定的 CGI 应用程序遇到错误,服务器终止了进程。
当我部署到本地 IIS 时一切正常。
Azure 记录器提供给我
无法使用命令行“%LAUNCHER_PATH% %LAUNCHER_ARGS%”启动进程,错误代码 =“0x80070002”。
我尝试在 web.config 中将 %LAUNCHER_PATH% 替换为 dotnet 和 %LAUNCHER_ARGS% 替换为 myapp.exe,但仍然出现相同的错误。
这是我的 project.json
{
"dependencies": {
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
}
},
"frameworks": {
"net46": {}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"gcServer": true
},
"publishOptions": {
"include": [
"wwwroot",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
谢谢
【问题讨论】:
-
检查对应的事件日志,看看是否有什么有趣的地方。通过将
stdoutLogEnabled设置为true和stdoutLogPath设置为\\?\%home%\LogFiles\stdout来打开日志记录,然后查看日志中的内容。看看我的帖子,其中提供了解决问题的步骤blog.3d-logic.com/2016/06/08/… -
谢谢 Pawel,我已经编辑了我的问题以显示您的建议结果。
-
您是否尝试再次下载发布配置文件?
标签: azure asp.net-core