Closed odinnix closed 7 years ago
When you run it locally, do you run Kestrel directly, or behind IIS?
@muratg Behind IIS Express using VS 2015 "run".
I did just try a dotnet run and got a different exception. I will research that a bit and report back.
Edit
dotnet run works fine once I release the port :)
Going to push to local IIS and try as well.
Two more things:
Thanks @dcarl1. A couple more questions
@muratg Thank you for the help!
I'm deploying via WebDeploy (VS). So I went down the 64/32bit road already a bit - it was indeed deploying a 64bit app, but I swapped the Azure setting to run 64bit apps - does this not work?
Anyways, I got it to deploy as a 32bit application:
Project.JSON changes
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true,
"platform": "x86" <-- new
},
"runtimes": {
"win7-x64": {},
"win7-x86": {}
},
This allowed me to select 'win7-x86' as a target runtime in the publish profile - however now the deployment failed with a file not found error (it was building into win7-x64 still).
I did some digging and installed the X86 .NET Core libs and SDK along with changing my system PATH so they get picked up over the 64 bit version. That got the deployment to work - however I'm still getting the same behavior on Azure.
So, I deployed the 32bit version to my local IIS using dotnet publish --framework win7-x86. The website works - even though the app pool is not configured to allow 32bit apps.
Confirmed its 32bit as well:
Dump of file WebUI-New.exe
PE signature found
File Type: EXECUTABLE IMAGE
FILE HEADER VALUES
14C machine (x86)
I recommend trying to remove win7-x64 from the runtimes section.
65 bit ASP.NET Core apps are not supported on Azure Web Sites as of yet (even if you configure it on the portal.) You shouldn't need to deploy .NET Core libs or SDK -- they're already installed on the server.
So recommendation -- make your app 32bit only, make sure it builds locally, and deploy.
Let me know how it goes!
65 bit ASP.NET Core apps are not supported
This is definitely true :trollface:
@muratg Just gave that a shot with no change. Work's locally but not on the server.
I'm starting to think this is related to something specific to our app rather then a config issue.
The first thing that comes to mind is app.config. We have a service reference in a different project that is expecting an app.config for its endpoint configuration. What are the chances that is causing Azure issues? If it cannot read the config file?
Is the error code 0x80004005 100% related to config? I can't find and documentation about what that code means by itself.
I think the next step should be systematically removing pieces of the application until it boots up...
@pan-wang do you know what this particular error code is?
This 502.5 error means the service cannot started. Does you app read some config file itself? Could you please check whether the file was deployed to the right folder? The .exe must be in the same folder as the web.config per your web.config file.
So... this was just a dumb little error (as most things that take several days to fix are).
In the app.config I had this line:
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
Which override everything but only if I rebuilt the entire project.
I removed the line and it works.
Glad to hear!
ASP.Net MVC Core Application running on .NET 4.6 (full framework). Everything works locally, but when publishing to Azure via one click publish the following error occurs with the standard 502.5 - Process Failure message:
Failed to start process with commandline '"D:\home\site\wwwroot\WebUI-New.exe" ', ErrorCode = '0x80004005'.
I've enabled STDOut logging, it creates the log files - however they are empty.
Originally I thought this was related to 1.0.1 however I've rolled back to 1.0.0 and still get the same error. I've tried everything here:
https://github.com/aspnet/IISIntegration/issues/252
252 seems to be directly related to DNX though.
and here:
https://docs.asp.net/en/latest/publishing/iis.html
The failed request trace is a standard CGI Failure message:
HTTP Error 502.5 - Bad Gateway The specified CGI application encountered an error and the server terminated the process. Most likely causes: The CGI application did not return a valid set of HTTP errors.A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.
Project.JSON (v.1.0.0 version however the 1.0.1 version was the same w/ different package versions):
Post deployment web.config
Program.cs
Other Notes