Category ".net-core"

Bearer error="invalid_token", error_description="The issuer is invalid"

I have a simple web api project, which looks like this: [Authorize] [Route("Get")] public ActionResult<string> SayHello() {

NLog not logging debug messages

I'm having a problem with logging Debug level messages in a .NET Core 3.1 Worker Service project. Neither my file target or console are getting Debug level mess

Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0' exception when starting Stateful Service

I have created a new Service Fabric application in Visual Studio 2017 (version 15.7.1) and added a new service using the .Net Core 2.0 Stateful Service template

Azure Service Bus send message every other time

I've a c# dotnet webjob and a simple desktop app. Sending a message apperaes to work only every other time. serviceBusClient = new QueueClient(_conf

Problem Changing the value of nested ValueObject using C# 10, .NET 6 and EF Core 6

My Aggregate is like this: public class Order : AggregateRoot { private readonly List<OrderItem> _items = new(); public DateTime Date { get; set;

TeamCity doesn't pick up result of xUnit tests when testing .NET Core project

I have a small .NET Core project, where the complete build/test/deploy process is handled in a Cake script. I have a powershell script that runs the cake scrip

Entity Framework Core: load related data after object is queried

It is clear how to query an entity and include all the related data; e.g.: using (var context = new BloggingContext()) { var blogs = context.Blogs .

AutoMapper - Trying to flatten my object property to string but getting an error

I am trying to map my ProductDto to Product class. I get an error when mapping the string property in ProductDto class to a Brand property in the Product class.

C++/CLI project in C# solution usage

Maybe this header isn't decribe my problem exactly, but... I have .NET Core console app project which uses C++/CLI project written as a wrapper for native C++ c

*System.Text.Json* unable to load when VisualStudio is not installed

I have a DLL based on netcoreapp3.1. The DLL references the NuGet package Microsoft.Extensions.Configuration.Json version 5.0.0. If I deploy the DLL to another

Set configuration and options from json file for servicebuilder in test project

Hi i am trying to configure and build services in a test project. I have read and built a json file into IConfigurationRoot, and can extracts specific parts ind

Web Application build error with net6.0 framework, is already signed (NETSDK1177)

I am working on MAC and dotnet core 3.1, 5.0 and 6.0 versions are installed on my machine. I not able to build Web Application on my machine due to shared error

'Nullable object must have a value.' for List in LINQ c#

In database I have next model tblWorkItem with next field: public List<xWorkItemItemFailReason> WorkItemItemFailReasons { get; set; } When I am trying

GraphQL : Not Getting EF Related objects after implementing Types

For background, I am following the tutorial here: https://www.youtube.com/watch?v=HuN94qNwQmM . As the code is too long I am putting that in git https://github.

System.Text.Json: How do I specify a custom name for an enum value?

Using the System.Text.Json serializer capabilities in .NET Core, how can I specify a custom value for an enum value, similar to JsonPropertyName? For example:

.net core build produces localization folders

I have a web asp.net solution that is using .net core 2.0. I am building it using the command: dotnet publish MySolution.sln --configuration release --output d

C# Setup Project for winforms app (.NET Framework) does not create start menu company directory

I have two versions of a Winforms project built using VS2019. "AppNetCore" is written using the Windows Forms App template, "AppNetFramework" with the Windows

How to download file on browser from Dotnet core endpoint

I have a react front-end and the dotnet core web API project on the back-end. I have an endpoint on which a client can request a file using fileId from my react

Net Core API: Purpose of ProducesResponseType

I want to understand the purpose of ProducesResponseType. Microsoft defines as a filter that specifies the type of the value and status code returned by the act

Use Prometheus in .net core application

I am doing POC using Prometheus in .net core app. I did not found sufficient information on Prometheus website to get started , I have following question if som