title: " Error: An error occurred while starting the application " while hosting in SmarterAsp.net WebApplication Asp.NET Core 2.2
body: <p>I tried to publish my ASP.NET Core 2.2 web application on Windows Server on SmarterAsp.Net hosting service. It runs fine on the local server, but when I try to deploy it to an SmarterAsp.Net hosted web app show the error-</p>
  
  <blockquote>
    <p>.NET Core 4.6.28207.03 X86 v4.0.0.0    |   Microsoft.AspNetCore.Hosting version 2.2.7-servicing-10089    |    Microsoft Windows 10.0.17763    |   Need help?</p>
  </blockquote>
  
  <p>I tried many methods giving on different blogs and forums site but not able to solve this error, like I tried -</p>
  
  <ul>
  <li>Capturestartuperrors(true) &amp; usesefling("DetailedErrors", "true")</li>
  <li><code>&lt;aspNetCore processPath="dotnet" arguments=".\OneMits.dll" stdoutLogEnabled="True" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" /&gt;</code></li>
  </ul>
  
  <p>I don't know how to store error in log file and if stored than do i have to publish again and again my application for small changes like making log file creation. </p>
  
  <p>Still no progress. <strong>What can I do?</strong></p>