We are working on an ASP.Net 5 web app that is supposed to be hosted on Azure (PAAS).
We can build and publish from VS2015. It works.
But when be build with dnu publish either on a VSO/VSTS build agent or using dnu publish on a local PC it does not work when uploaded to Azure. It displays the message "The specified CGI application encountered an error and the server terminated the process."
and HTTP status code 502.
The difference turns out to be web.config.
VS2015 inserts a line like this:
<httpPlatform processPath="%home%\site\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout.log" startupTimeLimit="3600"></httpPlatform>
With dnu publish:
<httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout.log" startupTimeLimit="3600"></httpPlatform>
According to the referred forum the http platform handler needs to be 1.2. But on the build server or web server?
Even if I have http platform handler 1.2 on my laptop, it still produces that relative path.
Which http platform handler version does Azure PAAS web sites have? and can I change it?
At this point the only solution I can see, is to do a search and replace after dnu publish.
I doubt this is how it was meant to work. What am I missing here?
None
0 Points
2 Posts
DNX_PATH being set wrong, when building with DNU publish vs. VS2015
May 13, 2016 04:28 PM|JN_DK|LINK
We are working on an ASP.Net 5 web app that is supposed to be hosted on Azure (PAAS).
We can build and publish from VS2015. It works.
But when be build with dnu publish either on a VSO/VSTS build agent or using dnu publish on a local PC it does not work when uploaded to Azure. It displays the message "The specified CGI application encountered an error and the server terminated the process." and HTTP status code 502.
The difference turns out to be web.config.
VS2015 inserts a line like this:
<httpPlatform processPath="%home%\site\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout.log" startupTimeLimit="3600"></httpPlatform>
With dnu publish:
<httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout.log" startupTimeLimit="3600"></httpPlatform>
Apparently the relative path is not working in Azure.
It seems to be same issue as described among others here: https://github.com/aspnet/Hosting/issues/412
According to the referred forum the http platform handler needs to be 1.2. But on the build server or web server?
Even if I have http platform handler 1.2 on my laptop, it still produces that relative path.
Which http platform handler version does Azure PAAS web sites have? and can I change it?
At this point the only solution I can see, is to do a search and replace after dnu publish.
I doubt this is how it was meant to work. What am I missing here?
Runtime: dnx-coreclr-win-x64.1.0.0-rc1-update1