HTTP Error 502.5 - Process Failure after Deployed the .Net core to Azure appservice - azure

I have recently upgraded my .Netcore webapi from 2.2 to 3.1 and deployed to azure app services.
Since then I got the below issue. I have reverted the release but still getting the same error.
I found few solutions for IIS but nothing for Azure app services .How to fix this?

[NEWEST]
Solution:
Reduce the version of Microsoft.Extensions.Configuration.Abstractions to 3.1.17 or 3.1.16.
Troubleshooting:
Try to find Microsoft.Extensions.Configuration.Abstractions on scm site.
I guess it don't include Microsoft.Extensions.Configuration.Abstractions package when deploy, so try to use below code in .csproj file. But it failed.
I try to find the reason on scm site, and I find it. On azure, .net core 3.1 just support the version of Microsoft.Extensions.Configuration.Abstractions are 3.1.17 and 3.1.16.
[PREVIOUS] The way to find the error logs
Judging from the error message, your webapp did not start. To solve the problem, we can only locate the error by querying the log.
You have the following two solutions to solve the problem. View the log:
Prerequisite: If you have successfully deployed the project before, please log in to the scm site to clean up all the files in the original wwwroot folder.
Plan 1:
Find the web.config file in the wwwroot folder and set stdoutLogEnabled="true".
You can refer to the following posts and github issues.
Azure Web App - Python: can't open file 'manage.py': [Errno 0] No error
How to enable stdoutLogEnabled=true when site is deployed with Run From Package
After add the settings in web.config, we can check the logs.
Plan 2:
Follow below picture, check Application Event Logs.
You also can refer my answer to Collect .NET Profiler Trace (Azure - Unhandled Exception: System.IO.FileNotFoundException).
After find the error, you can solve it quickly. If you also have some problem, you can create a new project without any sensitive info for us to reproduce your issues.

Related

Cannot deploy Azure app service via GitHub Actions after upgrading from .NET Core 5 to 6

I updated my ASP.NET Core web application from .NET Core 5 to .NET Core 6. This seems to work fine locally.
I then checked my changes into GitHub, whereupon a GitHub action builds and deploy this to my App Service on Azure. This did not work the first time, because my YAML file still referenced .NET 5. I changed that and tried again. However, I then got a different error:
Error: EISDIR: illegal operation on a directory, open '/home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE'
I found a post describing this very error and attempted to follow the instructions suggested by Trevor Davis (https://stackoverflow.com/a/70136206/98422), which was to delete the contents of the /home/site/wwwroot/ folder in my deployed App Service and re-deploy.
However, having done so, I now get a different error when trying to deploy the website:
Error: ENOENT: no such file or directory, open '/home/site/wwwroot/Azure.Storage.Blobs.dll'
An error has occurred during web site deployment.
Kudu Sync failed
...and now I've no idea how to fix it. And my website is down :-(
Can anyone please advise?
Well, I hope this helps someone else. I discovered that simply stopping the website while the deploy was in progress was enough to make it work again.
Two days needless downtime... :-(
I removed all references to identity as I wasn't using it, this got the deployment working. Not sure why..
I my situation, the underlying issue seemed to be updating Microsoft.AspNetCore.Identity.UI from version 5.* to version 6+. What worked for me was just reverting Microsoft.AspNetCore.Identity.UI to 5.0.17.

Web deployment task failed (Could not complete the request to remote agent URL https://xx.publish.azurewebsites.windows.net/msdeploy.axd?site=XXXXXXX)

I am trying to publish blazor server web application to azure linux app service via visual studio community version 16.9.5
But it is failing with error information below:
Severity Code Description Project File Line Suppression State
Error Web deployment task failed. (Could not complete the request to
remote agent URL
'https://XXXXXXX.publish.azurewebsites.windows.net/msdeploy.axd?site=XXXXXXX-dev__staging'.)
Could not complete the request to remote agent URL
'https://XXXXXX.publish.azurewebsites.windows.net/msdeploy.axd?site=XXXXXX-dev__staging'.
The operation has timed out xxxxxx.web 0
I faced this issue earlier also but after one or two retry it was getting solved automatically. but this time I am unable to publish it after more than 20 tries. there is no exact information on exact problem anywhere.
Please suggest me if any exact cause of the error or solution.
Thanks,
Ashish
Troubleshooting:
Maybe you can try to set WEBSITE_WEBDEPLOY_USE_SCM=false on portal.
For more details, you can refer this post.
Why is application deployment failing on waws-prod-blu-167.publish.azurewebsites.windows.net?
In contrast, when using vs2019 was previously released, whether Service Dependencies were added.
Check whether the configuration of Service Dependencies is correct.
If all the above methods fail, please download publish profile and import to vs2019, then retry to publish your app.

Where are the build logs for an azure app service?

D:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
Now, I know what to do if this error message had come from Visual Studio: Found conflicts between different versions of the same dependent assembly that could not be resolved
The problem is that this error message comes from drilling into "Logs" in the Deployment Centre of my Azure web app (from clicking "Show Logs..." next to "Running deployment command..." I can't figure out where these reference conflicts are listed for an Azure app service despite trying to turn on as much logging as possible and searching for a solution to this problem.
Could someone please show me where to go to see where these conflicts are listed in an Azure app service? Where is the build log? How do I turn it "on"?
EDIT: I just found this: What is the default location for MSBuild logs?. I don't know if it applies to Azure.
Update:
The code is being continuously pulled into my Azure app from my Azure DevOps repository whenever I push a new code change. It's building (which includes compiling) on the server, somewhere. I just don't think there's any way to actually see the build logs. In Visual Studio, all we have is the output window, and there's no equivalent on the server.
Update:
Before viewing logs on Azure, be aware that azure-web-sites do not provide compilation capabilities, so compilation-related warnings and errors are not displayed in the logs. Azure's log feature is used to track runtime warnings or run-time errors, not compile-time.
Since you have deployed to Azure, please have a look of this:
Log stream:
From your description, you need to change the assembly which is mismatch with others.
If you still can't resolve this problem, please add the error and the assembly you used in your app service to this question text.

Why does my Umbraco installation from within the Azure Marketplace always fail?

I am trying to install Umbraco by using the Azure Marketplace. There they offer a template for it. I am always receiving the error below. I tried to install it a couple of times now but I always get the same error.
Does anybody know what this error message means? Is anybody able to install Umbraco by using the template in the Azure Marketplace?
]
You're asking 2 questions above.
Please see my answers and proposed troubleshooting guide/workaround below:
The error message means that the MSDeploy process failed due to some error which renders it unable to deploy the web deploy package for your Umbraco web app.
Yes I am able to provision a Umbraco web app from the Azure Market successfully (Location: Central US) and couldn't reproduce your issue
Troubleshooting Guide:
Append .scm in front of the azurewebsites.net of your Umbraco Web App as shown below and go to the Url.
Click on the Diagnostic Dump. You will be prompted to download a .zip file
Extract the zip file. You should see 2 folders at root level
Go into
LogFiles\SiteExtensions\MSDeploy
You should see the detail log files for MSDeploy
Detailed MSDeploy log messages are in the appManagerLog.xml file.
If it is related to client side issue which can be resolved by yourself, you can try to resolve it and try again.
If it is related to server side issue, you should create a support ticket for Microsoft to look into with the detailed MSDeploy log which pinpoints the root cause which will help them a lot.
Hope this is useful.
A Microsoft employee confirmed this is a bug in the application currently. I have to wait for a fix.
I have encountered numerous problems with the Azure installer of Umbraco, try setting it up in VS2015 then publishing it to Azure. I have found that this works well.

Identity Server v3 can't find endpoints

I’m trying to get Identity Server v3 up and running. Below is what I've done.
Created an empty ASP.NET web project
Copied the StartUp and
config files from the SelfHost (Minimal) (http://goo.gl/ojOjSJ)
sample project
Installed the following Nuget packages: OWIN,
Microsoft.Owin, Microsoft.Owin.Host.SystemWeb, and
Thinktecture.IdentityServer.v3
Add the [assembly: OwinStartup(typeof(Startup))] attribute
When I run locally and try to hit one of the endpoints (/core/.well-known/jwks), I get “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.” I know startup is running because I can set a breakpoint and it hits it.
Any help would be greatly appreciated.
At this point you are better off with using the github issue tracker because idsrv is still under development.
I found a solution for this by installing the following hotfix for handlers with extensionless URLs: https://support.microsoft.com/en-us/help/980368/a-update-is-available-that-enables-certain-iis-7.0-or-iis-7.5-handlers-to-handle-requests-whose-urls-do-not-end-with-a-period

Resources