ThisWorld NeedsHope
ThisWorld NeedsHope

Reputation: 23

Azure - Unhandled Exception: System.IO.FileNotFoundException

i have a situation here. I would to publish one of my 'test' .net core application (.net core 3.1) to see how Azure platfrom works and there is a problem after publishing web app is running then i have an error: "currently unable to handle this request HTTP ERROR 500". Actions taken:

(web.config after edit):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\SportsStore.dll" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
   <runtime>  
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
        <dependentAssembly>
            <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.0.0.0" />
        </dependentAssembly>
      </assemblyBinding>  
   </runtime> 
</configuration>

I found a lot of topics about this issue but it wasn't help in my case. Any sugesstions ?

Upvotes: 1

Views: 2116

Answers (1)

Jason Pan
Jason Pan

Reputation: 21883

From your description, I think this 500 error should be a deployment failure error.

At the end of the answer, there is a suggested solution to try, it is recommended to try.

In order to quickly locate and solve the problem, I recommend using git for continuous deployment. More error logs can be viewed in Action like pic.

enter image description here

If the above method does not help you locate the specific cause of the failure, then I suggest you use Diagnose and solve problems to troubleshoot the problem. Search the search box for Collect .NET Profiler Trace,

enter image description here

Then you can click Collect Profile Trace, and wait system generate a report. Click the link, you will open a new page and see more details about the webapp.

enter image description here

Suggest a trial plan (specific problems need specific solutions)

  1. Try by modifying the web.config file.

enter image description here

enter image description here

<customErrors defaultRedirect="YourErrorPage.aspx" mode="Off">
<error statusCode="500" redirect="InternalErrorPage.aspx"/>

You also can create log in your code, then you can see more details.

  1. When you are sure that there is no problem with your program, it is recommended to re-create a new resource group or choose another region to try to redeploy. If this error still occurs, it is recommended to raise a support ticket in the portal.

Sum up:

  1. First of all, it is recommended to use git for continuous deployment to troubleshoot the operating environment or problems that occur in the release operation.

  2. Use tools to troubleshoot the root cause, if it is really impossible, you can raise a ticket for support.

Upvotes: 2

Related Questions