Category "c++sharp"

TCPClient Reconnect to Local Server

I am using TcpClient to talk to a device that connects directly to the computer's Ethernet connector via a crossover cable. I connect to the server in the devi

Can I programmatically attach a running .NET 6 process to a running instance of Visual Studio debugger?

I'm debugging an IPC logic where one .NET 6 processes is launching another, and I can't get to debug both within the same Visual Studio 2022 instance. When the

Get one solid from element in Revit

Converting Autodesk.Revit.DB.Element to Autodesk.Revit.DB.Solid I already tried to extract all solids from element, and that's was okay, I had a list of 2 - 10

Sending a Post Request to register a new user to a Web API, but receiving 400 : BadRequest

Having issues with my code [ Throwing an Unhandled exception: System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Req

How can I read in an edited textarea?

I'm trying to get the new textarea value to read into my controller so that way I can store the new value in my SQl database. View: @{ ViewBag.Title = "TRIO

Loading assets from Asset Bundles for Play Asset Delivery in Unity

I am currently maintaining an old project which I would very much like to keep the old code and avoid refactoring of the old code if it's possible. To upload it

Getting null pointer exception after deployment in GCP

I have a .NET application divided in microservices. One of the microservices is the orchestrator and authenticaticator: this microservice communicates to 3 othe

how to make Azure Function using Blob Trigger await until the all files is loaded completely to the container in Azure?

I'm using Azure function application and I'm using 5 or 6 blob trigger function in my project, I publish my project to azure and I need the function app to be e

SettingsPropertyValue in ConfigurationManager won't serialize array of strings

I'm transferring an application from .Net Framework 4.6.2 to .NET 6 and I'm getting some problems with the ConfigurationManger where it is not able to serialize

Getting overlapping regex matches in C#

I have the regex 1(0*)1 and the test string 1000010001 I want to have 2 matches, but I find that only 1 gets found : var regex = new Regex("1(0*)1"); var valu

Entity Framework Core Delete Behavior

So I have these 3 tables where 2 of them(Post(Parent of Comment table as well) and Comment Table) is parent of Reaction Table. Post Table: public class Post {

Blazor WASM application stops responding after handling modal ok eventcallback, which performs a delete request

I implemented a delete button for a table, and when clicking the button a modal is shown to make sure the user really wants to delete that entry, but after the

ConfigureAwait(false) and struct implementation of IAsyncDisposable

I have implemented IAsyncDisposable with an ActionOnAsyncDispose struct as shown below. My understanding is that the compiler will not box it when it is in an a

Synchronize NAudio playback to multiple devices

I am trying to write a program which synchronizes playback of an audio file (MP3) using NAudio. I've wrote a sync method which kicks in every 5 seconds to repos

WebAPI and Azure AD - works fine with obsolete setup, but not when updated to new setup

I have an existing Web API project, which uses Azure AD for authentication. Prior to my joining the organisation, I understand that this was an ASP.Net 3.1 proj

.Net5 version-tolerant assembly loading

I have the following situation in .Net5/C# that I'm struggling to resolve. We have Application (let's call it Platform) U that is able to load plugins, e.g. Plu

BindingRedirects in .net 6

I have been trying to fix version conflicts in my .net6 console project. I fail to find a way like app.config's BindingRedirect or CodeBase whiuch were in .Net

Task.Delay() doesn't work with big TimeSpan (an hour), but works with smaller (10 minutes)

My code is: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using Sy

How to call UseEndpoints() and MapGraphQL() for HotChocolate on Azure Function isolated/out-of-process?

I follow this repo https://github.com/chandsalam1108/GraphQLAzFunctionNet5 and https://chillicream.com/docs/hotchocolate/server/endpoints#mapgraphql How do I ca

How can I reproduce Serilog's LogContext behavior?

this is a question of functioning issue, because I didn't understand correctly how you use information sharing. I'm wanting to do something similar to LogContex