Category "c++sharp"

How to serialize enum as string in Function App running on .net5 with OpenAPI/Swagger?

I am exploring Function App running on .net5 in the new isolated mode. I have HTTP triggered functions that I want to advertise via OpenAPI / Swagger. To do so,

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

In asp.net core mvc, the model binding for decimals does not accept thousand separators

For a model with a decimal property, if the value from client contains commas as thousand separator, the model binding will fail. How can we solve this? Any so

Adding Inlines to TextBox is very slow

In my application i have a console-like-control that displays infromation I send from various functions using: Run run = new Run("FancyText"); run.FontSize = 15

displaying parent-child elements hierarchically in c#

I have a parent-child structure in my db and I want to list them hierarchically n a C# program: id text parentid 1 A NULL 2 B NULL 5 a1 1 6

How to use MediaPipe in C#?

I would like to use the Face Mesh application from Media Pipe in a C# project. As the library is not impemented in C#, I looked for solutions. I found that my f

414 (Request-URI Too Long)

I am working on MVC platform and I am calling jqGrid using JSON GET. I have read on Request Limits, maxQueryStringLength, maxAllowedContentLength, maximum leng

C# extracting a single variable from html document from a website

This is what it looks like. I've tried something like this: var url = "https://www.tek-zence.no/"; var httpsClient = new HttpClient(); var html = await httpsCl

How to copy a file to a sharepoint site

I have to copy a file on a sharepoint site. I have seen that the only authentication working is with the AuthenticationManager. So this works: var authManager =

C# Progress Bar Min value is not updating from textbox

Im trying to work with progress bar in C# WFA. My code works but i have problem with Min value of progress bar. It only works when i enter max value first not m

trying to make an enemy shoot a projectile at the player when the player enters the enemys range

for some reason the projectile is fired but only when the enemy comes into contact with the player and very slowly for some reason. below is my code. (there i

DataTemplate doesn't work when moved to ResourceDictionary

I was trying to move a DataTemplate from a ListView into a resource dictionary and it somehow broke the Bindings, I believe. I verified that when I hardcode th

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

Regex expression to capture only numeric fields and strip $ and comma, no match if there are any alphanumeric

I'm trying to write a regex that will strip out $ and , from a value and not match at all if there are any other non-numerics. $100 -> 100 $12,203.00 -> 1

Null Reference Exception when calling GraphServiceClient from a .net core Razor application that uses OpenIdConnect

I am working on a DotNet Core Razor application that uses OpenIdConnect to authenticate against Azure AD. This site is currently targeting the .net 5.0 framewor

How do you create a Blazor WebAssembly website connected to a database with CRUD functions

I am trying to get deeper into blazor. I want to build a website that can use CRUD functions connected to a database. I use Microsoft SQL Server along with Micr

filter data in header based on API key authentication

I want to try to filter data based on API key authentication using NET CORE where the key is stored in the header. each key has its own data. is there a refere

Confluent Kafka Connector Configuration with C# / .net

I'm trying to build a connector to go into the confluent kafka library. I have seen many examples in java that use configDef to define the configuration options

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

HttpContext.SignInAsync() doesn't authenticate the user

I have been trying to create a custom login feature in ASP.NET Core 2.1. However, it doesn't seem the work and I have no idea why. This is run in the controlle