当我以 net451 或 net46 框架为目标时,我似乎无法将我的 asp.net core RC2 应用程序部署到 Azure。
当我尝试访问我的应用程序时,出现以下错误
The specified CGI application encountered an error and the server terminated the process.
当我部署到本地 IIS 时,一切正常。
Azure 记录器给了我
Failed to start process with commandline '%LAUNCHER_PATH% %LAUNCHER_ARGS%', Error Code = '0x80070002'.
我尝试在网络中将 dotnet
替换为 %LAUNCHER_PATH%
并将 %LAUNCHER_ARGS%
替换为 myapp.exe
.config 但仍然出现同样的错误。
这是我的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%" ]
}
}
谢谢
最佳答案
看来更新我的 web.config 以指定 processPath 就成功了。
我还必须删除之前的发布尝试才能使其正常工作。
<aspNetCore processPath=".\myapp.exe" arguments="" forwardWindowsAuthToken="false" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\stdout"/>
关于azure - 无法将面向 net451 或 net46 的 ASP.net core RC2 部署到 Azure Web App,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37780855/