Category ".net-6.0"

Setting the LOGGING__CONSOLE__FORMATTERNAME in aspnet6.0 image

How do I set this environment variable when I run a .NET 6.0 docker file? I have a docker image based off aspnet6.0 Docker file. By default the environment vari

Unable to resolve service for type 'Duende.IdentityServer.Stores.IClientStore'

I am migrating drom Identity Server to Duende Identity Server and using .net 6 core project and I'm getting the following error in the startup on builder.build(

Script missing when implementing NetEscapades.AspNetCore.SecurityHeaders

I have implemented CSP and CORS when doing so my external script is not rendering on the page. builder.Services.AddCors(options => { options.AddPolicy(name:

Script missing when implementing NetEscapades.AspNetCore.SecurityHeaders

I have implemented CSP and CORS when doing so my external script is not rendering on the page. builder.Services.AddCors(options => { options.AddPolicy(name:

Azure File Share : Find files with same first part of the filename C#

I have large number of files in a file share directory. Some of the files have their first part of the names are similar. I have to copy these files to another

Cannot load System.Web.HttpContext error with razor pages and WebMail

I've been having trouble getting WebMail to work sending an email using a contact form using This Official Microsoft Tutorial. My current issue is that I'm get

log4net in .NET core 6

I used to use .NET core 5, but now I'm trying to use .NET core 6, it seems the old Startup.cs is mixed now with Program.cs. The thing is that I'm trying to add

Where to get libgrpc_csharp_ext.arm64.dylib?

When I try to run app with Google.Ads.GoogleAds nuget package on MacOS with M1 silicon I get the following error : Unhandled exception. System.IO.FileNotFoundE

ASP.NET Core (.Net 6) Web Application throws System.NotSupportedException when run as a service. (Service will not start)

When I attempt to run my .Net Web Application as a Windows Service, it does not start. It works if I just run the executable but mysteriously fails when attempt

Creating a (.NET 6 based) website project with ASP.NET Core and React (TypeScript) in Visual Studio 2022?

I have been trying to set up an ASP.NET Core + React (TypeScript) web app project in Visual Studio 2022, but couldn't succeed in doing so. There are no proper s

API Gateway Ocelot .Net Core 6.1 Setup

The .Net 6 have removed the Start up Class and i am not able to find out how to configure Ocelot in new .Net 6 structure. I have found two methos using Ocelot.

How to setup AutoMapper in ASP.Net Core 6

How to configure AutoMapper in ASP.Net Core 6 I have a project which is written in .Net 3.1 so we had Startup.cs class. I am migrating it to .net core 6 now whe

Blazor WebAssembly InvalidCastException when running Published version on IIS

I have a Blazor WebAssembly application that works fine when debugging, but throws an exception when running on IIS (Published): blazor.webassembly.js:1 crit: M

Running .NET 6 project in Docker throws Globalization.CultureNotFoundException

I have upgraded API project from .NET 5 to .NET 6 successfully and running fine when executed locally (without Docker). I have also updated the version in Docke

Microsoft.Extensions.Logging custom implementation, how to get the caller method name?

I'm in .NET 6, I implemented a custom ILogger<TService> (of Microsoft.Extensions.Logging). Usually, when I implement a logger, I also get the caller metho

Combine Json and file upload in a controller

I'm trying to send a form with Angular to a controller that contains json and a file. [HttpPost("Save", Name = "SaveReportRequest")] public ActionResult<Repo

How to create a JSON body with PowerShell which is Deserializable by .NET6 when using az rest to call a .NET6 Azure Function

We are using AzureCLI to be able to call an Azure Function endpoint upon a successful deployment. The call to get token works and the call to our azure functio

Microsoft.Extensions.Hosting.HostFactoryResolver+HostingListener+StopTheHostException

I'm using Asp.Net Core Web Api 6 I'm facing an error when migrating my DbContext and when updating the database The Error [17:07:29 INF] Application Is Starting

Aftter conversion to .NET 6.0, question mark is added to text

We have an ASP.NET Web API project that gets data from Java service that lives in Web Sphere and is exposed as a WCF service. After conversion to .NET 6.0, the

Custom Result in Net 6 Minimal API

In ASP.NET Core 5 I had a custom Action Result as follows: public class ErrorResult : ActionResult { private readonly IList<Error> _errors; public E