skip to Main Content

Azure – Calling an ASP.NET Core Web API integrated to EntraId app from another .NET Core console app integrated to EntraId app fails

I have created an ASP.NET Core Web API and registered it in EntraID and configured it in my program.cs as follows: builder.Services .AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("AzureAd")); builder.Services.AddAuthorization(); Then I have registered another app in the EntraId and configured the code in the…

VIEW QUESTION

Telegram – Decide program running as Windows service / console cmd C# .NET

Basically I already try deciding using if else like this: static async Task Main(string[] args) { string licenseKey = Environment.GetEnvironmentVariable("LICENSE_KEY"); if (string.IsNullOrEmpty(licenseKey)) { Console.WriteLine("LICENSE_KEY not found."); return; } if (args.Contains("--console") || Environment.GetEnvironmentVariable("RUN_AS_SERVICE") != "true") { Console.WriteLine("Running as console."); var cancellationTokenSource…

VIEW QUESTION
Back To Top
Search