locked
Logs not giving enough level of detail to find shut down reason. RRS feed

  • Question

  • User-183185495 posted

    I am deploying to my hosting compnay the code and site works perfect off line while connected to their database but when i publish the logs are telling me the following with no real detal. Its a .net 5 web api project being published to a third party host

    info: Microsoft.Hosting.Lifetime[0]
          Now listening on: http://127.0.0.1:40175
    info: Microsoft.Hosting.Lifetime[0]
          Application started. Press Ctrl+C to shut down.
    info: Microsoft.Hosting.Lifetime[0]
          Hosting environment: Production
    info: Microsoft.Hosting.Lifetime[0]
          Content root path: C:\home\site\wwwroot
    info: Microsoft.Hosting.Lifetime[0]
          Application is shutting down...

    I got the above logs by this line

              <aspNetCore processPath=".\MSFSAddonsHub.WebApi.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\text.txt" />

    Saturday, December 26, 2020 9:25 PM

All replies

  • User1120430333 posted

    I am deploying to my hosting compnay the code and site works perfect off line while connected to their database.

    Well did you try publishing to your development computer to local IIS to see that it works?

    Sunday, December 27, 2020 8:18 AM
  • User475983607 posted

    I think part of the confusing is there are no logs.  I'm guessing you did not write or configure logging for the environment published on the host.  You are only seeing the default logs; application start and stop.

    I think you'll be interested in reading the official documentation.

    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-5.0

    Sunday, December 27, 2020 2:11 PM
  • User-183185495 posted

    I have a ILoogger defined but didnt know about the host method will look into that but I found my reason funny enough it was cause I had know ssl installed on the hosting side.

    Sunday, December 27, 2020 5:00 PM