Category "c++sharp"

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

WebClient throw 'An exception occurred during WebClient request'

I know that question has been ask a lot in the internet, but yet i didn't found a satisfying answer. private string LocalSqlDriverDownloader() {

IQueryable extension to group dynamicly by minutes ...and other

I wanted to create an IQueryable extension to allow other developers to group entities by minutely interval but also by custom group key result. My idea was to

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

Connect to Azure Service Bus with Amqp over WebSockets using new Standard library

I am trying to send a message to my queue hosted in azure. My application communicates with the world through a proxy. I use the .Net Core 2.1 and the new the

ASP.NET MVC: Method for HttpPost is not executed

In an ASP.NET MVC application, I have a file MessageController.cs where I define EditMessage for access via HttpGet and HttpPost. Usually the user first accesse

Arquivo make file para entrar em pastas [closed]

I have a MakeFile file in the following way: conf: cd teste nano teste However, when i execute make conf, he does not enter in the di

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