Hi Guys,
I am new to App Services, Recently i am facing a crazy problem. I have a web app that when I publish to an Azure App Service via Visual Studio it works great but when the app is built and published via Azure DevOps (all tasks report success), I get a 404 from the home page. I'm just doing a plain publish of the release build. Nothing funky as far as I can tell.
I initially thought it was my WebHost Builder UseUrls call. So I changed it:
.UseUrls(new[] { "http://*:44399" }) => .UseUrls(new[] { "http://localhost:44399","http://*:80" })
but that didnt work.
I enabled diagnostic logs on the app service but that didnt show me anything.
Using the console on the app service, I can browse to the wwwroot directory and see that the files are being updated by the azure devops publish. Also viewed the environmental variables and there is no ASPNETCORE_* vars set.
At a loss of what else to try.
Program.cs
                    public static IWebHost BuildWebHost(string[] args)
                    {
                        return WebHost.CreateDefaultBuilder(args)
                            .UseStartup<Startup>()
                            .UseUrls(new[] { "http://localhost:44399","http://*:80" })
                            .Build();
                    }
                    public static void Main(string[] args)
                    {
                        BuildWebHost(args).Run();
                    }
                }
Thanks & Regards
Camillelola