Category ".net-core"

How can I run a dotnet application in the background using sudo on Linux? [duplicate]

I am experiencing some weird problems that I'm not sure how to solve. I am using CodeDeploy to deploy my applications to an AWS EC2 instance,

VS Code / OmniSharp - how to set path to dotnet SDK / CLI tools explicitly

I'm using Visual Studio Code. On my machine, I have two separate installations of the Net Core SDK / dotnet CLI tools; an outdated version (netcore 1.1) in the

Getting Unsupported Media Type for .net core

I'm new in backend development and Gettig 415 Unsupported Media Type in multipart API written in .net core. I have attached the postman image for your reference

Bundler & Minifier error 0: Expected closing parenthesis, found ','

I am getting some really annoying errors when debugging my ASP .NET Core application in VSCode. It seems to be related to my css bundler/minifier, but I have n

''MS-ASPNETCORE-TOKEN' does not match the expected pairing token' when calling deployed .net core API on IIS

I am receiving the following exception in the logs and event viewer when calling an endpoint in a .Net core application (3.1): 'MS-ASPNETCORE-TOKEN' does not m

Dotnet restore not working

dotnet Version: 1.1.0 (global.json) NuGet Version : 4.4.1.4656 VS2017 v15.5.2 (as Administrator) .NET Core 1.1 The solution I am trying to build Update I: I jus

Does not contain definition for "HasDefaultValue"

I want to set a default value for a non nullable field in code first. I have included Microsoft.EntityFrameworkCore but I'm still getting Does not contain

How can I use Azure Devops Release Pipeline Variables in a Kubernetes CI/CD with Helm?

I'm currently working on setting up a CI/CD pipeline to my client's new Kubernetes clusters that they host on Harbor using Helm and Azure DevOps Server, and I'm

Delaying a task for a very very long time

If we delay a Task using the Task.Delay method for a very long time, let's say 6 months, and if we assume that the OS does not shutdown or restart during this p

How to fix 'rimraf is not a recognized command' in Windows 10

After creating the .NET Core / React & Redux project template and attempting to start the application, the react compile crashes with rimraf not recognized.

Entity Framework Core 5 and CosmosDB SQL API - Include extension method does not work

I have followed the steps from the following EF Core 5 site in order to store and read items from the CosmosDB. Here is the site: https://www.learnentityframewo

How do I use Visual Studio 2019 to remotely debug a .NetCore application on a Hyper-V Linux VM?

I am attempting to remotely debug a .NetCore application in Ubuntu Linux from Visual Studio 2019 in Windows 10. I can see the remote ipaddress (ping thru comman

How could I get a parameter of an action from the ResultExecutingContext when using a Filter

I'm creating a custom result filter that implements IAsyncResultFilter interface. In this filter I need the actual value returned by the Action, but I also need

JetBrains Rider - configure appsettings overrides

I am trying JetBrains Rider for my existing .NET Core project. In the project I have several appsettings.json overrides: appsettings.Development.json - for dev

How to return HttpStatusCode 404 for incorrect url with FallbackPolicy set in AuthorizationOptions?

In the web application I'm currently working on there is a requirement for all users to be authenticated. This is currently handled by using an AuthorizeFilter.

Role based authorization using Keycloak and .NET core

Having a few minor issues with role based authorization with dotnet core 2.2.3 and Keycloak 4.5.0. In Keycloak, I've defined a role of 'tester' and a client rol

Storing DateTimeOffset value without milliseconds in SQL Server using EF Core

Say I create a DateTimeOffset value like this: var dt = DateTimeOffset.UtcNow; And I want to store this value in SQL Server using EF Core code-first. How do I

Calling Another Project's Controller From A Project In The Same Solution (.NET Core )

There are 2 projects in the same solution. First project is a .NET Core project and it has all the codes(controllers, models etc.) related to packages. I need t

What is the right macro for platform?

I'm trying to write a pre-build event script that must be able to adapt the the build platform (Windows / Mac / Azure DevOps image) in my case. So far I have fo

Disable verbose logging of symbol loading in vscode debug console

When running my webapp (in vscode), the debug console is filled with lines like these: Loaded '/foo/bar/dotnet/shared/Microsoft.NETCore.App/2.2.4/System.Pri