You can try following options to fix your issue.
1. Fixed the issue using UseIISIntegration() on the WebHostBuilder.as follows:
public static void Main(string args)
var whost = new WebHostBuilder()
UseIISIntegration() // Must for Azure.
2. Fixed the issue by setting the requestTimeout within the web.config as follows:
<?xml version="1.0" encoding="utf-8"?>
<location path="." inheritInChildApplications="false">
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
<aspNetCore processPath=".\PROJECT.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" requestTimeout="00:30:00"/>
3. Fixed the issue by following the below steps.
Firstly my application was .NET CORE 2.2 and I was trying to deploy it in the Azure web app.
I just Right Clicked on the project and clicked on the publish button.
After that Selected the publish profile which I had downloaded from Azure.
Next changed the deployment mode under the Summary to Self-Contained.
Finally clicked on publish button and it worked.