HTTP Error 500.30 - ASP.NET Core app failed to start using azure webservice

273 Views Asked by At

I deployed .net 7 api on azure web service ,after deployment when i tried to access my site it shows this HTTP Error 500.30 - ASP.NET Core app failed to start

i triedto diagonose but i failed !

i used to azure cloud platform to deploy my apis but it doest work

1

There are 1 best solutions below

0
Sampath On

I created an ASP .NET Web API and deployed it to Azure App Service using GitHub actions.

I followed these steps:

  • Create an ASP .NET Web API project and make changes in program.cs and run locally.

  • The below code is a sample ASP NET to set up a web application with Swagger for API documentation.


var builder = WebApplication.CreateBuilder(args);

builder.Services.AddControllers();

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

app.UseDeveloperExceptionPage();
app.UseSwagger();
app.UseSwaggerUI(x =>
{

    x.SwaggerEndpoint("/swagger/v1/swagger.json", "Web API V1");

#if DEBUG
    x.RoutePrefix = "swagger"; 
#else
    x.RoutePrefix = string.Empty;
#endif
}
);
app.UseHttpsRedirection();

app.UseAuthorization();

app.MapControllers();

app.Run();

  • Pushed the Code to Git .

enter image description here

Git action states: enter image description here

Azure: enter image description here