Category ".net"

Using the Try-Convert Tool for migrating from .net to .net core Multiple installs of MSBuild

I have installed the Try-Convert tool, and when i go to the root of my project and execute the try-convert command - I get multiple installs of MSBuild detected

UI changes not persisting in ASP.Net application

I have a table that's hidden by default. When clicking the search button, I'm using jQuery to remove the d-none class and show the table. <input type="submi

How to fill text with 2 different color/texture

I draw text on top of a image using Path.Addstring and filling it with a color and it works perfectly. Now I would like to split(bisect) the text vertically and

Rapid stack allocations vs accessing a single heap allocation

I'm having a situation where I have an array T[] which must be copied in an instant and sent over to a function accepting a ReadOnlySpan<T>. I found two s

Using C# Moq testing getting Parameter count mismatch?

I know there are similar questions but somehow I am not able to figure out the situation in my case. I am getting Paramater count mismatch exception. Here is

How can I create a partitioned table in EF Core?

Let's say I have an object like this: public class ObjectA { public int Id {get;set;} public DateTime CreatedOn {get;set;} ...etc } I want to partitio

How to create a cron like job using HangFire at startup?

I have a service class that has a method like public void BackgroundJob(string cronrule) { RecurringJob.AddOrUpdate("somejob", () => FetchCallHistoryAsyn

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

WinUI Desktop app publish in app center: Problem occurred while extracting your app

I am trying to upload a WinUI desktop package in appcenter, but i am facing a below issue when uploading the packages. In addition, I have tried some other app

How to modify port in .Net framework web api

I write a demo program, to use .NET Framework Web Api2. For some reason, I have to use .NET Framework rather than .Net Core. But I've got a problem, how to modi

What is a NullReferenceException, and how do I fix it?

I have some code and when it executes, it throws a NullReferenceException, saying: Object reference not set to an instance of an object.

Error 400 - Bad Request an Creating user with Microsoft Graph

I am trying to create a new user in my tenant using Microsoft Graph (v1.0) with help of the Microsoft doc. When I create my user, I always get an error 400 bad

Count number of polygons within a polyline

I have a collection of vertices that have been drawn sequentially by a user and I need to count how many enclosed areas there are within this shape. I have mana

How does the behavior of .Take() changes based on the interface reference I'm using on left. IQueryable vs IEnumerable

Assume I've these sample codes IQueryable<Employee> data = context.Employees.Where(x => x.FullName != "Shekar Reddy"); var topE

Http 403 server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature

I generated SAS url with below code var blobBuilder = new BlobSasBuilder() { ExpiresOn = DateTimeOffset.UtcNow.AddDays(2),

ASP.Net WebSocket how to simulate error event?

I just want to do like this on ASP.NET WebSocket. When my WebSocket server catches internal server error, I want my WebSocket server to send an error to clients

Asp.Net Client Certificate Authentication - Issue with website re-prompting for client PIN

I have an ASP.NET 5 web application that is setup to use client certificate authentication, specifically a DoD CAC. I followed Microsoft's guidance (here) to se

Can't find single property and navigate related data without IQueryable all properties

I have relational data properties on my objects that I would like to access: public class Person { public ICollection<Address> Addresses { get; private

Update From Bootstrap 3.7 to 5.0.2 in .net mvc producing Error- System.NullReferenceException

I uninstalled the basic bootstrap template that comes with .net MVC Application and installed the bootstrap 5.0.2 from NuGetPackage Manager. Now I am Encounteri

System.UnauthorizedAccessException in mscorlib.dll

I was developing an ASP.NET application. Then I did not test the application in the debugger of Visual Studio, but transferred it via File Deploy to another ser