Category "c++sharp"

Visual Studio 2019 - Docker 4.1.1 - Web App Stops Working After Adding Container Orchestration

This is sort of strange. As soon as I add docker orchestration in Visual Studio 2019 my Web Application stops working. These are the exact steps that I am takin

Currently able to calculate total neighbors, I need just the neighbors that are alive

I have a bool [,] board that stores if the cell is alive or dead. The code I have provided is correctly telling me the total neighbors for each cell, the proble

Why does Event Grid serialize my already serialized data?

I am trying to get into dotnet and Azure and so I build small solution that triggers a azure function by http with a count that then requests the given amount o

dotnet watch run -c $(Configuration) with hot reload

I want to launch my Blazor app with specific configuration and have hot-reload enabled. When I launch with: dotnet watch Hot reload is enabled and everything i

how to Check Client connection status in Blazor web assembly

I have a Blazor webasemmbly app, it's using asp.net core as backend and Blazor wasm as frontend. I have a class that can check the HTTP issues like notfound, Ba

Error handling with Azure Function ServiceBusTrigger

I have an Azure Function as below. I came to know that ServiceBusTrigger provides a retry mechanism and by default retry five times and after that write a messa

Unity FPS Controller camera only moves when mouse movement stops

Using unity FPSController asset, here's the code for actually moving the camera called in LateUpdate() method. private void CameraRotation() { // if there i

Why is await HttpContext.SignInAsync("MyCookieAuth", claimsPrincipal); throwing No sign-in authentication handlers are registered? (Razor Page model)

I'm trying to do a simple user authentication with the following code public async Task<IActionResult> OnPostAsync() { if (!ModelState

Visual Studio 2022 Crashes when Adding SqlDataSource using any MS Access Database in ASP.NET C# Web Project

When adding a "SqlDataSource" using any version of MS Access database the app simply crashes when you "Test Connection". This happens in the designer when usin

.Net Core 'asp-append-version' interfering with CSP nonces in Umbraco 9

I have a very simple TagHelper which will add the current CSP nonce to a specified tag. This is all working fine until I start using asp-append-version along wi

How can display Picker item of firebase realtime using xamarain forms and add to firebase when select item

I want to display a picker items from firebase how can do this ? <Picker x:Name="AppointmentPatientName" Title="Patient Name" > <Picker.Ite

MongoDB .NET Driver - StartsWith & Contains with loosely typed data

I can use the following for exact matches on loosely typed data in MongoDB: var mongoClient = new MongoClient(con); IMongoDatabase mongoDatabase = mongoClient.G

Unity - How to rename Mesh via script?

I am working on a script to rename Mesh in Unity directly because every time if I rename a FBX file the mesh asset still keep the old name as last time it has b

Unable to decrypt PGP encrypted file into Stream from Azure Blob storage using C# scripting within script task of SSIS

I am trying to read the PGP encrypted file from Azure Blob Storage using SSIS package - Script Task- C# code into Stream, decrypt the file data into string and

How to get and Bind() data from dynamic view in asp.net

I wrote Create() method to create a Test and I input that data- 1)choose from dropdownlist ,for which Course I want to add this Test 2)name 3)description I have

Prevent EF from creating table from subclasses

I have 2 classes; Product and Book. Book is subclass of Product. In my DbContext there is only DbSet of Product. I'm using EF Code-First approach. when EF creat

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",