Open Closed

Unable-to-deploy-web-app-into-azure-web-services or local IIS #7054


User avatar
0
Sergei.Gorlovetsky created
  • ABP Framework version: 8.0
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello,

I am trying to deploy web API on Azure App services. I followed the steps mentioned here https://docs.abp.io/en/commercial/latest/startup-templates/application/azure-deployment/step1-create-azure-resources?UI=NG&DB=EF&Tiered=Yes

However, I face this issue:

Checking the Log Stream in Azure App Services, I find this error:

On Checking under Azure App service > Debug and Solve problems > Application Logs, I find this


After this, I also tried to publish the application into my local machine folder and then these commands, but unable to to execute it in my local as well

Can I get some input, on what I might be doing wrong here ? Thanks

it is fine when I build and run the app from Visual Studio in development mode.


10 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you get the logs.txt when the app is running on Azure App Service?

  • User Avatar
    0
    Sergei.Gorlovetsky created

    Are you looking for this one ?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The abp app logs.

    See .WriteTo.Async(c => c.File("Logs/logs.txt"))

    namespace MyCompanyName.MyProjectName;
    
    public class Program
    {
        public async static Task<int> Main(string[] args)
        {
            Log.Logger = new LoggerConfiguration()
    #if DEBUG
                .MinimumLevel.Debug()
    #else
                .MinimumLevel.Information()
    #endif
                .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
                .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
                .Enrich.FromLogContext()
                .WriteTo.Async(c => c.File("Logs/logs.txt"))
                .WriteTo.Async(c => c.Console())
                .CreateLogger();
    
  • User Avatar
    0
    Sergei.Gorlovetsky created

    I tried looking for it, but I couldn't find the Logs folder in my Azure App Service:

    I also tried to publish and deploy it on my local IIS and there the Logs folder is empty

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The app might not run at all.

    Please check the stdout logs.

    https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-8.0 https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-8.0#aspnet-core-module-stdout-log-azure-app-service

    https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/logging-and-diagnostics?view=aspnetcore-8.0

  • User Avatar
    0
    Sergei.Gorlovetsky created

    the stdout log file is empty.

    Also sharing my web.config and program.cs file with you

    I have checked, the defaultAppPool has write permission in the publish folder.

  • User Avatar
    0
    Sergei.Gorlovetsky created

    Also, these are logs from Event Viewer

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you export these logs of Event Viewer?

    Thanks liming.ma@volosoft.com

  • User Avatar
    0
    Sergei.Gorlovetsky created

    Thanks. I emailed you.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The exception code (0xe0434352) is described in Microsoft's troubleshooting guide.

    https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/azure-iis-errors-reference?view=aspnetcore-8.0#an-x86-app-is-deployed-but-the-app-pool-isnt-enabled-for-32-bit-apps

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11