Category "c++sharp"

How to restart manually a BackgroundService in ASP.net core

I create the BackgroundService: public class CustomService : BackgroundService { protected override async Task ExecuteAsync(CancellationToken cancellationTo

Private class method or interface? [closed]

I'm working on an app which uses the Factory pattern to create new objects. In the Factory Class I've added a new Private method called SendAp

Cannot Read struct with string from PLC using s7netplus c#

im trying to read this data block from Siemens S1500 PLC using s7netplus libary and my mapped code struct looks like this public struct testStruct {

convert List of string array into xml

I need to convert list of array into xml. In the list the first object is the elements of the xml and from second object onwards it is the values of the element

How to work with Subsonic MySQL in ASP.NET Core 3.1?

What are the requirements and how to work with subsonic in ASP.NET Core 3.1 or later versions? How to build DAL using subsonic in ASP.NET Core 3.1? What is the

How to Order these list of string according to its version

Adding some sample data var list0 = new List<string>() { "MAS_Prod_1.2107.0.8","MAS_Prod_1.2107.0.4","MAS_Prod_1.2107.0.7","MAS_Prod_1.2107.0.12", "MAS_Pr

How do I add a metric name to MetricOrderBy when using Google.Analytics.Data.V1Beta?

I am writing come code in c# with Visual Studio 2022 to fetch Google G4 analytics data and cannot get one piece to work correctly. It is the part where a create

How to jump properly using character controller?

I'm using a character controller for my player movement. I had walking and running working, but I couldn't get the jumping to work. Here is my code: [SerializeF

how to fix this error "Microsoft.Extensions.Azure: Could not load file or assembly 'System.Diagnostics.Tracing, Version=5.0.0.0,"

there’s a problem that I didn’t understand where it came from because the script worked yesterday , I woke up and I found this problem that wasn&rsq

How to use anchor tag as submit button in asp.net razor pages

I have a handler method in razor page with name OnGetExpense(UsePayload payload) page.cshtml: <input type="hidden" asp-for="Filters.From" value="@Model.Filte

Application Insights Telemetry: can you track traces/events/etc. asynchronously?

I am a longtime user of Azure's Application Insights, and I use the TelemetryClient's TrackTrace() and TrackException() liberally in every enterprise applicatio

Single Tenant Application needs to support SSO from a multi-tenant provider dynamically with OpenId Owin

I'm trying to use OpenId to authenticate against a dynamic authority URL. There is an unknown number of different {n-tenant}.identityProvider.com authority URL

How to map Object to KeyValuePair<char, string> using AutoMapper?

I'm trying to map my object model to a KeyValuePair<char, string> but my results are KeyValuePairs where Key = null and Value = null. What's the correct w

How can i ignore Uppercase or lowercase in ado.net linq to sql?

i have this query i want the user to search with the name without uppercase or lowercase , how can i do this ? join Materiel in ds.

Moving from HttpWebRequest to HttpClient

I would like to update some legacy code from using HttpWebRequest to use HttpClient, but I am not quite sure how to send string to the REST API I am accessing.

IdentityServer4.Stores.ValidatingClientStore Invalid client configuration for ... client no allowed grant type specified

Hi I am getting the error... "IdentityServer4.Stores.ValidatingClientStore Invalid client configuration for ... client no allowed grant type specified" when u

Making request without refreshing page with blazor

Please i am new to blazor, I am building a pet project and i want to make a call to the server to do so validation if the text entered into an input textbox is

why is Intellisense not working in my VS Code?

I am working on vs code. When I open any folder the IntelliSense is not working when I hover the mouse over any text. It was working before but now I don't know

.NET 6 (stable) IConfiguration setup in Program.cs

This appears to be a similar problem but none of the answers are fitting for my code...: Read appsettings.json in Main Program.cs This is extremely similar but

How can I make it so when my player collides with an enemy, it disables movement input until player touches the ground?

So, I want to make it so the player loses control when it collides with an enemy. I already got a thing set up to make the player fly off towards the direction