Category ".net-core"

How to use multiple Program classes in xUnit test project with WebApplicationFactory

I want to use WebApplicationFactory to create hosts for my tests, but I want to create 2 Web Application Factories for two projects I refereed in single XUnit t

Is there a way in Fluent Validation library to remove the index from the collection validation errors?

I'm using Fluent Validation to validate this model: class MyModel { public int Id {get; set;} public List<ChildModel> Children {get; set;} } clas

Operator "missing" not working properly in JsonLogic

I am using JsonLogic to validate my input payload with the rules defined using JsonLogic. I am able to test the rules using "Play with it" tool and my rules wor

Tenants Not Loading When Adding Azure AD Service Dependency

I'm attempting to add an AAD service dependency to a new ASP.NET Core Web App (MVC) project. I went to Connected Services, clicked on "Add a service dependency"

Transactionscope throwing exception this platform does not support distributed transactions while opening connection object

TransactionScope is throwing a exception in .net core 2.2 In this example I created a scope of TransactioScop. Opening SQL transaction for one database which is

Where can I find the source code for AWS Lambda's dotnetcore3.1 runtime?

AWS publishes a lot of their source code on GitHub, but so far I haven't been able to find the source for the dotnetcore3.1 Lambda Runtime. I expect this source

Error "dotnet : Could not find any project in `C:\**." when running "dotnet add package Microsoft.AspNetCore.Authentication.MicrosoftAccount"

I have visual studio 2019 and i created a new asp.net core 2.2 project. now i am following these steps Configure Microsoft Account Authentication to enable exte

How to get Serilog to enrich logs

I've set Serilog to read its config from appsettings.json: return WebHost.CreateDefaultBuilder(args) .UseSerilog((ctx, config) => { config.ReadFrom.Confi

Invalid non-ASCII or control character in header on redirect

I'm using asp.net core 2.1 and I have a problem on redirect. My URL is like: HTTP://localhost:60695/ShowProduct/2/شال-آبی

Blazor-server-side can't see GLTF files

i have my blazor app hosted on azure with iis got some GLTF file i want to access with three.js but its like my app can't see any of my GLTF files. i have added

EF Core executing previously failed query on SaveChanges

We have a .Net Core 3.1 application which is using EF Core to connect wit the SQL Server database. We are facing one problem, that when an exception occurs in o

EF Core executing previously failed query on SaveChanges

We have a .Net Core 3.1 application which is using EF Core to connect wit the SQL Server database. We are facing one problem, that when an exception occurs in o

DotNet5 Hangfire microservice running on multiple servers

We have a microservice having hangfire scheduler deployed in multiple server environment. Currently the hangfire gets triggers from all 3 servers simultaneously

PayPal Checkout popup randomly closes

We are having an issue in a Blazor WebAssembly app, which is using PayPal buttons for users to Add Funds to the system's wallet. The issue is random, sometimes

Worker service stops working unexpectedly

I have .NET Core 3+ worker service that checks "some stuff" every 10 seconds. At one point, it "randomly" stopped doing that and I am not sure why. So far it ha

.NET Core Entity Framework how to map nested class into one sql table

I'm still new to .NET Core. I have this character that I want to store in SQLite using an entity. But by default, Character, CharacterData and CharacterLine are

How to configure IIS to define Client Certificate required on a specific endpoint when routing make endpoint path different from physical path

I implemented a dotnet core Api where endpoints are defined based on the Controller attribute Route. I have for example 2 endpoints api/controller1 and api/cont

load .so file use fullPath fail with dotnet3.1 on centos7

I use dotnetcore 3.1 Pinvoke to call my .so file,but it can't be load.I used myLibraryFullPath to load it.What can i do to load this .so file? i can post image,

Get .NET Core JsonSerializer to serialize private members

I have a class with a private List<T> property which I would like to serialize/deserialize using the JsonSerializer. Use of the JsonPropertyAttribute does

Database operation expected to affect 1 row(s) but actually affected 0 row(s) entity framework core

I have the following code try { using (var context = await PrepareDatabase()) { // Update temp roles by removing one row, this