HTTP Error 502.5 - Process Failure" asp.net core 2 error in Azure #406
Comments
@CharlBest Could you please turn on logging from web.config and collect Windows event log? Those logs will give the hint on why the failure happens. |
@pan-wang how would I do that? Firstly I don't have a web.config file in my solution and secondly not sure what code to write. Can you please specify? |
@pan-wang I got this from my Log Stream on Azure. Hope it helps |
The web.config is produced by the publish step if none is provided in the solution. You need to modify the
to |
More specifically, you'll need to use Kudu Console (https://{yourapp}.scm.azurewebsites.net/), go to site\wwwroot, and edit the web.config you see in there. |
Thanks @davidebbo. I used the new awesome App Service Editor (Preview). Really really nice. Feels like VS Code on the web. Very impressed. Anyway got this message in my logs: Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Hosting.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) |
This could be potentially a problem with the runtime store containing mismatching binaries. Let me see if I can reproduce the issue. |
Ok cool. Thanks @JunTaoLuo Let me know if I can do something :) |
See https://stackoverflow.com/questions/44550096/asp-net-core-2-0-on-azure-results-in-a-502-5. That issue relates to having old things leftover from previous 1.x deployment. Can you try wiping out wwwroot and deploying clean? |
Yayyyyy @davidebbo Its working. Thank you.
You guys are awesome. Thank you so much for the quickly replies. 👍 Update: |
Awesome! @pan-wang, we can probably close this, and hopefully others running into it will find the issue. Unfortunately, it's more an msdeploy issue (leaving dirty files) then an Azure or Core issue. |
Hi all,
My general feedback on diagnostics: Last but not least, at the moment of writing of this, I still do not know what is my error. :) My expectation is following:
No configuration, no web.config changes, no KUDU. Thanks |
Thanks.
|
Should be from the approot. stdout-xxx.log is generated automatically. |
@bplus0 can you show that line of your web.config? |
@Tratcher Hey - here is the entire web.config, This was made completely from my publish, I don't have any web.config in my solution.
Can you elaborate a little more on what you mean by event logs? I haven't been able to find anything relevant in the folders I submitted in my previous post. If you want more info in a PM I can provide that - (I don't know the rules on long threads on GitHub) Edit- Hey @Tratcher, does this make any sense to you? If not I can remove it from this comment. I just want to make sure I provide enough info when posting my issue.
|
Ok, the Those look like FREB logs, and all they tell us is that you got a 502.5 error. I meant the windows event logs. Though looking at your screen shots I realize that you're on some public hoster? They may not expose those to you. I know Azure copies them to a log folder in your app. |
Its a 'cheaper' solution than azure. I'm working with them to see if they are the issue. I do have one thing for you though - if you see the screen shots above. There are no 'Views', 'refs', or 'runtime' directories. When i publish the 1.1 version of the same app everything goes with. Did something change in core 2.0 regarding publishing all files? Does that make sense? |
2.0 uses pre-compiled views by default so those files no longer need to be published. |
@Tratcher Thanks Chris. By the way - I reached out to the hosting service. They had to change something on their end to let .NET Core 2.0 run. I'm good to go, and I think the help listed here had something to do with it. Thanks again! |
Today I got this error in my Azure Web App but deleting the WWWROOT folder did not help. Is it possible to avoid the automatic update?? |
@ndreisg the upgrade to 2.0.3 should not be causing any deployment failures. If you think you have a case where it does, please open a separate issue so we can investigate that specifically. And please make it clear whether the problem happened as a result of deploying, or whether the app that was running suddenly broke with no deployments on your end (but not here, in a separate issue please). |
azure not suport dotnet 2.0.3 runtime |
@bigo92 that is not correct. Azure App Service has had 2.0.3 for several weeks. |
Hi, |
thank you! demo is verry good
…On Thu, Dec 14, 2017 at 11:54 PM, Pluto Solutions ***@***.***> wrote:
Hi, Can you fix it ?
Here is the solution https://youtu.be/rAA1FVA0fog
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#406 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK9w3o6uaX2mUQLwVUwC1i5Q4biPAT26ks5tAVK2gaJpZM4O5Fbb>
.
|
You are welcome. |
is there a different command to do Framework Dependent Deployment. Its recommended. @PlutoSolutions \ |
I ran through the same issue today and have fixed by changing web.config file. |
I my case was a .Net framework that was not installed in the IIS server. My project have the .Net Framework 4.6.1 as target... so I install the .Net Framework 4.6.1 in the server and the problem is solved. |
Does Azure support Microsoft.AspNetCore.All (2.0.6) yet? I am having the same issue when deploying a newly created project from Visual Studio 2017 15.6.2. Microsoft.AspNetCore.All (2.0.6) is what ships with this version of Visual Studio 2017. The issue can easily be reproduce by following these steps:
Attempting to downgrade to < 2.0.6 doesn't work; publishing will throw an error.
It won't let me post what my web.config looks like from the App Service Editor. |
The deployment is not complete, see Azure/app-service-announcements#92 |
The deployment is now complete. |
@davidebbo Thanks for the update. I will attempt another deployment when I am able and let you know the result. I attempted a deployment using Visual Studio 2017 15.5.7 which ships with Microsoft.AspNetCore.All (2.0.5) and I still have issues (http://webapplication320180316115814.azurewebsites.net/). Any reason, that you are aware of, that would cause downgrades of Microsoft.AspNetCore.All to cause build issues with Visual Studio 2017 15.6.2? |
@haydenhancock I think it would be best to open a new issue to discuss. This one looks like it's been already used for various unrelated issues (even if they all happen to end up with a Process Failure), and it's been closed for a while. Also, please include a sample repo to make it easier to investigate. Thanks! |
@davidebbo Done #681. Thanks! |
If anyone happens to get this far in the comments and is having the same issue, check to see if the correct .NET SDK is installed on the server you are publishing to. In my case, all I had to do was install the .NET Core 2 SDK and the API started working after my upgrade. |
This just started happening out of nowhere and a quick investigation revealed that it's having trouble finding the Microsoft.AspNetCore.Antiforgery library which I don't use. I don't have any problems on my dev env, this is only happening on the staging server. I have found a couple of workarounds but what I care about right now if anybody knows why this is happening. I'm about to go live with a project using .net core the first time and I cannot afford this happening on production. |
If a project dll name contains space, why will it cause 502 error? For example "my web api.dll" (assembly name in VS) causes the error but "mywebapi.dll" works perfect. I spent millions seconds to figure out a workaround to fix the error. In VS, a dll name with space runs ok but as soon as it is published, it won't work with "HTTP Error 502.5 - Process Failure". Azure documents may have the naming convention such as "do not have space in assembly name" i don't know. |
I updated my projects from .NET Core 1.1 to .NET Core 2.0.
I then deploy my API app and Web app via Visual Studio 2017 15.3 web deploy and now have these errors when visiting my apps.
I have tried the possible fix mentioned in this Stack Overflow post but it doesn't seem to work. https://stackoverflow.com/questions/45694286/net-core-2-0-azure-app-service-502-5-error/45715420#45715420
This was a problem in the past here: #252
I also spoke to @davidebbo about this in Azure/app-service-announcements-discussions#6 (comment)
Thanks in advance.
The text was updated successfully, but these errors were encountered: