title: Asp.net core 2.0 migrate from 1.x published to Azure not working HTTP Error 502.5 - Process Failure
body: <p>I, have migrated from Asp.net core 1.x to 2.0. The application was working perfectly on 1.x with Azure Hosting. Now when I published the application I am getting an errors as </p>
  
  <p><a href="https://i.stack.imgur.com/hRnrL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hRnrL.png" alt="Errors Details"></a></p>
  
  <p>When I, check the Logs I am getting an errors as </p>
  
  <p><strong>Unhandled Exception: System.FormatException: The short switch '-argFile' is not defined in the switch mappings.
     at Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationProvider.Load()
     at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
     at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
     at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException&amp; hostingStartupErrors)
     at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
     at FalconWebsite.Program.BuildWebHost(String[] args) in D:\Ecommerce\FalconWebsite\FalconWebsite\Program.cs:line 14
     at FalconWebsite.Program.Main(String[] args) in D:\Ecommerce\FalconWebsite\FalconWebsite\Program.cs:line 10</strong></p>
  
  <p>Here is my Program.cs file</p>
  
  <pre><code>using Microsoft.AspNetCore;
  using Microsoft.AspNetCore.Hosting;
  
  namespace FalconWebsite
  {
      public class Program
      {
          public static void Main(string[] args)
          {
              BuildWebHost(args).Run();
          }
  
          public static IWebHost BuildWebHost(string[] args) =&gt;
              WebHost.CreateDefaultBuilder(args)
                  .UseStartup&lt;Startup&gt;()
                  .Build();
      }
  
  
  }
  </code></pre>
  
  <p>Web.config File</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;!--
    Configure your application settings in appsettings.json. Learn more at https://go.microsoft.com/fwlink/?LinkId=786380
  
    &lt;appSettings&gt;
        appSettings in web.config is no longer used in ASP.NET Core, instead use appsettings.json
    &lt;/appSettings&gt;
    --&gt;
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" /&gt;
      &lt;/handlers&gt;
      &lt;aspNetCore processPath="bin\IISSupport\VSIISExeLauncher.exe"  arguments="-argFile IISExeLauncherArgs.txt" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" /&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I did, some research from these 
  <a href="https://stackoverflow.com/questions/45795405/http-error-502-5-process-failure-asp-net-core-2-0">HTTP Error 502.5 - Process Failure asp.net core 2.0</a>
  <a href="https://github.com/aspnet/IISIntegration/issues/406" rel="nofollow noreferrer">https://github.com/aspnet/IISIntegration/issues/406</a>
  <a href="https://stackoverflow.com/questions/44550096/asp-net-core-2-0-on-azure-results-in-a-502-5">Asp.Net Core 2.0 on Azure results in a 502.5</a>
  <a href="https://github.com/dotnet/cli/issues/7741" rel="nofollow noreferrer">https://github.com/dotnet/cli/issues/7741</a></p>
  
  <p>From the link the solution was to remove  <code>arguments="-argFile IISExeLauncherArgs.txt"</code> But this doesn't solve my problem and no new errors in the logs files.</p>
  
  <p>xx.csproj file</p>
  
  <pre><code>&lt;Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web"&gt;
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp2.0&lt;/TargetFramework&gt;
      &lt;TypeScriptToolsVersion&gt;2.3&lt;/TypeScriptToolsVersion&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup&gt;
      &lt;AssetTargetFallback&gt;$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;&lt;/AssetTargetFallback&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Compile Remove="node_modules\**" /&gt;
      &lt;Compile Remove="wwwroot\node_modules\**" /&gt;
      &lt;Content Remove="node_modules\**" /&gt;
      &lt;Content Remove="wwwroot\node_modules\**" /&gt;
      &lt;EmbeddedResource Remove="node_modules\**" /&gt;
      &lt;EmbeddedResource Remove="wwwroot\node_modules\**" /&gt;
      &lt;None Remove="node_modules\**" /&gt;
      &lt;None Remove="wwwroot\node_modules\**" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;None Remove="Properties\PublishProfiles\FalconWebsite20170204094000 - Web Deploy.pubxml" /&gt;
      &lt;None Remove="Properties\PublishProfiles\FalconWebsiteDev - Web Deploy.pubxml" /&gt;
      &lt;None Remove="Properties\PublishProfiles\FeteBird - Web Deploy.pubxml" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
    &lt;PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" /&gt;
  &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" /&gt;
      &lt;DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.0" /&gt;
      &lt;DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Folder Include="Areas\Admin\Controllers\" /&gt;
      &lt;Folder Include="Areas\Admin\Views\Admin\" /&gt;
      &lt;Folder Include="Properties\PublishProfiles\" /&gt;
      &lt;Folder Include="Views\Account\" /&gt;
      &lt;Folder Include="Views\Checkout\" /&gt;
      &lt;Folder Include="wwwroot\app\" /&gt;
    &lt;/ItemGroup&gt;
  
      &lt;None Include="wwwroot\fonts\fontawesome-webfont.svg" /&gt;
      &lt;None Include="wwwroot\fonts\fontawesome-webfont.woff2" /&gt;
      &lt;None Include="wwwroot\js\KnockoutViewModel\CategoryViewModel.js" /&gt;
      &lt;None Include="wwwroot\js\KnockoutViewModel\ItemColorsViewModel.js" /&gt;
      &lt;None Include="wwwroot\js\KnockoutViewModel\ItemsViewModel.js" /&gt;
      &lt;None Include="wwwroot\js\KnockoutViewModel\LoginAuthentication.js" /&gt;
      &lt;None Include="wwwroot\js\KnockoutViewModel\SubCategoryTwoViewModel.js" /&gt;
      &lt;None Include="wwwroot\js\KnockoutViewModel\SubCategoryViewModal.js" /&gt;
      &lt;None Include="wwwroot\js\ProjectJquery\SingleItemJquery.js" /&gt;
      &lt;None Include="wwwroot\js\site.js" /&gt;
      &lt;None Include="wwwroot\js\site.min.js" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\css\bootstrap-colorpicker.css.map" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\css\bootstrap-colorpicker.min.css.map" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\css\bootstrap-theme.css.map" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\css\bootstrap-theme.min.css.map" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\css\bootstrap.css.map" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\css\bootstrap.min.css.map" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\fonts\glyphicons-halflings-regular.svg" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\fonts\glyphicons-halflings-regular.woff2" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\js\bootstrap-colorpicker.min.js" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\js\bootstrap-select.min.js" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\js\bootstrap-toggle.min.js" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\js\bootstrap.js" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\js\bootstrap.min.js" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\dist\js\npm.js" /&gt;
      &lt;None Include="wwwroot\lib\bootstrap\LICENSE" /&gt;
      &lt;None Include="wwwroot\lib\Color\color_classifier.js" /&gt;
      &lt;None Include="wwwroot\lib\Color\dataset.js" /&gt;
      &lt;None Include="wwwroot\lib\googleMaterialDesignLite\material.min.js" /&gt;
      &lt;None Include="wwwroot\lib\jquery-validation-unobtrusive\jquery.validate.unobtrusive.js" /&gt;
      &lt;None Include="wwwroot\lib\jquery-validation-unobtrusive\jquery.validate.unobtrusive.min.js" /&gt;
      &lt;None Include="wwwroot\lib\jquery-validation\dist\additional-methods.js" /&gt;
      &lt;None Include="wwwroot\lib\jquery-validation\dist\additional-methods.min.js" /&gt;
      &lt;None Include="wwwroot\lib\jquery-validation\dist\jquery.validate.js" /&gt;
      &lt;None Include="wwwroot\lib\jquery-validation\dist\jquery.validate.min.js" /&gt;
      &lt;None Include="wwwroot\lib\jquery-validation\LICENSE.md" /&gt;
      &lt;None Include="wwwroot\lib\jquery\dist\jquery.js" /&gt;
      &lt;None Include="wwwroot\lib\jquery\dist\jquery.min.js" /&gt;
      &lt;None Include="wwwroot\lib\jquery\dist\jquery.min.map" /&gt;
      &lt;None Include="wwwroot\lib\jquery\dist\Jquerymask.js" /&gt;
      &lt;None Include="wwwroot\lib\knockout\KnockoutFileUpload.js" /&gt;
      &lt;None Include="wwwroot\lib\knockout\Knockoutv3.4.1.js" /&gt;
    &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>I, am not able to solve this issue from 2 days. Can anyone please let me know whats wrongs.</p>