Category "c++sharp"

Log HttpContext.Response.Headers on OnActionExecuted in .NET 6

I'm trying to create an attribute [LogRequest] which will log HTTP request and response with headers. Action controller [HttpGet] [Route("GetCourse")] [LogRequ

Breakpoint not hit in EF Core IEntityTypeConfiguration class on add-migration in PackageManagerConsole

I am doing some discovery in a small test project and am trying to have a breakpoint hit in the configuration definition class. public class TripExpenseComparis

ASP.NET MVC - Populate SelectList with Font-Awesome Icons

I've populated List with font-awesome strings like: private static readonly List<string> Icons = new(){ "<i class=\"fas fa-users\"></i>",

How to count the length of value array in JSON

I have a JSON below: { "value": [ { "name": "504896c031d2fcb9", "location": "North Europe", "properties": { "state": "UNKNOWN",

MissingMethodException when migrating from Ef 6.2 to 6.4.4

For a .net framework 4.8 project, when I update the EF reference from 6.2 to 6.4.4 the application throw an error System.MissingMethodException: Unable find 'V

MAUI - OnPropertyChange not updating the UI

Hi guys I’m working on a MAUI app and I have a problem with the ui not updating every after calling OnPRopertyChanged, here are the details: When calling

Blob Storage - handle files directly on it

I desire an efficient solution to iterate through large files located on blob storage in C#. I want to use the blob storage as a local storage. In my research I

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.

Automapper. How to map custom type property of inner class (source) to string and string array?

I want to map source inner classes to string and in other case string array but in both cases they are mapped to null. I want MapNoteFromInnerSourceEntity1 to h

ASP.Net Core Email Breaks Suddenly Citing SSL Time Mismatch

After noticing that nobody has signed up for a site of mine for a week I tried signing up myself only to be greeted with an error message. Then I tried signing

Error trying modify some attributes of a database table in a controller C#

I´m trying to modify attributes using sql database and web api .Net 6 In a controller i have this method private void SetRefreshToken(RefreshToken newRefr

ProjectTo behaves differently than expected when mapping a member via an interface

I discovered some unexpected behavior in my mappings that might be an AutoMapper bug, but there is enough complexity that I might be missing some nuance, somewh

Don't understand behavior of Tasks in C#

I'm hoping someone can help me understand what seems like some straightforward code. Clearly, I'm missing something. There are 2 things I don't understand about

I've made a code for a assignment but i need a push in the right direction [closed]

i need your guidance for this assignment: At TEC Ballerup Stadium with room for 500 spectators, football matches are played every Sunday at 10

How do i load CheckBoxList from a Selected Value from DropDownList?

i'm trying to do a display database's item(tables, rows, fk,...). I'm stucking at first few step. I loaded the db's names into a DropDownList. But i tried to lo

Unable to save and then load app settings via JSON - 'System.Text.Json.JsonElement' to type 'System.Collections.Generic.List`1[System.String]'.'

Using the below code, I'm trying to save app settings data in JSON format so it's easily readable and (in theory) easy to load back directly into data structure

How to fix Win UI C# application has exited with code -1073740791 (0xc0000409)

I have two issues, I am trying to do the WIN UI tutorial (https://docs.microsoft.com/en-us/windows/apps/winui/winui3/create-your-first-winui3-app) for creating

Run along the rows in Excel

I have new entries that go into the Excel table and I constantly want to run to the last row number but it does not work excel.Row.Count() this the problem for

Deserialize json properties when property name matches only partially JsonPropertyNameAttribute.Name value

I am looking for a mechanism in the System.Text.Json package, where I would be able to deserialize JSON on partially matching property names. Unfortunately, the

Downloading users subbed to my twitch via twitch API

I am trying to get a list of users who are subscribed to a twitch channel through the twitch API, I have setup the request to get the access token and then I am