Category ".net-core"

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

EF Core one-one relationships

I need to configure following one-one relationship with ef-core public class Player { public long Id { get; set; } public string Name { get; set; }

Is there another way to view a PDF file from dotnet core API with react

I have dotnet core API thats returning a downloadable and i want my react to view as a blob but the pdf that is getting rendered is blank Dotnet core code

How to add bearer token authentication to typed HttpClient in Asp.Net Core 6

I'm trying to setup a web api using ASP.Net Core 6 so that users can hit my end points and then I do some work in D365 behind the scenes using a privileged acco

System.Configuration.ConfigurationManager vs Microsoft.Extensions.Configuration

I am working on a class library(.NET Standard 2.0) CL, which will be used by some of our legacy projects(.NET Framework 4.6.1) LP and many of our new implementa

Should I take ILogger, ILogger<T>, ILoggerFactory or ILoggerProvider for a library?

This may be somewhat related to Pass ILogger or ILoggerFactory to constructors in AspNet Core?, however this is specifically about Library Design, not about how

Does the latest version of System.Data.Sqlite not support password encryption?

I've got a .Net Core appl and am using the System.Data.SQLite.dll package to connect to a SQLite DB. I'm trying to encrypt the database with a password. In vers