Category ".net-core"

ASP.NET Core YARP Reverse Proxy multiple listen ports

I want to Reverse Proxy multiple ports, with YARP. 0.0.0.0:5001 => RemoteHost.com:7001 0.0.0.0:5002 => RemoteHost.com:7002 0.0.0.0:5003 => Remote

How do I solve SqlNullValueException?

I'm trying to find an entity but I get a SqlNullValueException when entity framework is trying to get the value of a field that's Null. I checked in the databa

Application insights | Sometimes End-to-end transaction details do not show all telemetry

I have .Net core App deployed on azure and enabled application insights. Sometimes Azure application insights End-to-end transaction details do not display all

How can I log messages from an ASP.NET Core application to a specific file on Linux?

I installed an ASP.NET Core application as a Linux daemon. By default .NET writes logs into /var/log/message but I would like the application to write its logs

Access IHost across application classes globally

Below is an example code for CreateHostBuilder. Asp.net core host takes care of resolving dependency through constructor and middleware. If we want to resolve

Button Click to return to the same page with same input parameters

I want users to navigate back to the same page after the button is clicked on the page. If the user URL is https://localhost:xxx/Inventories/Index/38?custID=38&

How to declare global variable in Program cs and use it in controllers in .NET 6.0 Web Api

I have default Program.cs file from Web Api template in .NET 6.0. I am adding variable "test" so I can use its value in controllers. var builder = WebApplicatio

How to declare global variable in Program cs and use it in controllers in .NET 6.0 Web Api

I have default Program.cs file from Web Api template in .NET 6.0. I am adding variable "test" so I can use its value in controllers. var builder = WebApplicatio

.net Core 3.0, DirectoryNotFoundException with Xunit Integration test

I have a new issue working on migrating my Xunit integration test on .net core 3.0. I moved the project in a subfolder and now I have a DirectoryNotFoundExcepti

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