Category "c++sharp"

Avoid unnecessary include statements in SQL database query for ASP.NET Core

There are some times where I have a user and would like to check whether they are in the organization that owns the item they are trying to access. Let's say th

.Net Framework Debug window is not working

I have a problem of debugging. I have the window created with the buttons, labels and everything, but when i try to debug it, the UI/GUI doesn't show up. I am o

Is there a way to dynamically filter the JSON?

I am searching a way to filter the JObject according to the request from URL. Second code block works as expected and removes the "Id" column from response: My

why Task delay not working in Window_KeyUp and Window_KeyDown methods?

I have three buttons. The timer should have started when I pressed any of the 3 optional buttons. For example. When I press the blueHeadTopBtn button, the timer

NULL exception error using Select method in MS Graph .NET SDK

I'm trying to use the Microsoft Graph .NET SDK Library to query the Microsoft Graph API. I've had no trouble making some basic requests, but now I'm trying to m

NSwag Studio C# generated client code does not have any return types assigned

I am trying to generate some client code from a swagger.json file and the methods created by NSwag do not have any return types as you can see below: Can anyone

TCP Client becomes unreadable after server restart

Code: while(true) { Int32 port = Convert.ToInt32(Port); TcpClient client = new TcpClient(server, port);

Connecting an ObservableCollection to Listview for a Windows Application UI (Visual Studio C#)

I'm working on a project where an application displays data by pulling it from a file and displaying a new data value every second. (edit: consolidated code at

Get Parent property of network adapter device from c#

I need to get the Parent property of network adapter device from c# program Please find the image here Tried below code but the property "Parent" is not availab

empty response - Docker Container ASP.NET CORE 6

I got stuck on this for quite some time and i don't know why it doesn't work. I looked into posts similair to mine but i can't fix it, (tried checking the firew

How to speed up building .net solution in docker

My current setup: App.sln src\ ----BaseProject\ -------------Dockerfile -------------BaseProject.csproj ----ProjectA\ -------------Dockerfile -------------Proje

How to use impersonation in Blazor Server Side to access a folder on a File Server

In .NET Framework, using this would let me impersonate a user in Active Directory to gain access to a locked down folder on the file server: [DllImport("advapi3

How to achieve Indeterminate state for checkbox in Xamarin form In Android

I want to achieve CheckBox where it works for three state. In UWP I am able to achieve with custom Renderer with "IsThreeState" and by setting IsChecked propert

ASP.NET Core 3.1 MVC JWT Login return 401

I have a problem , jwt authentication return 401 Error. Token was created but always return 401 error. I used layered architecture. I tried many things on start

.NET 6 problem: Bearer error="invalid_token" error_description="The signature is invalid" in SwaggerUI

I am currently trying to make authenticator when a specific user logs in and gets the weathercontroller information. It says that the jwt token is invalid. So I

Uno Platform Project reports: The reference assemblies for .NETFramework,Version=v5.0 were not found

I am trying to create and run an Uno Platform app using Visual Studio Community 2019. It always reports the error: The reference assemblies for .NETFramework,V

How do I get the userId to save in the database while submitting the form?

I'm a beginner and well i'm doing a form which is capable to send information to the database but I needed one more thing to be sent and it is the Id from the u

301 Permanent Redirect with Blazor and razor page

I would like to redirect all pages which doesn't match to any pattern to homepage. Structure of the URL makes it possible with catch-all option and I can easily

How to serialize multi-types Collection with IXmlSerializable

I'm writing an xml that seem decent to me but i have issue reading into last collection. Xml <SWorkspace Title="Default" NosWorkSpaceGuid="69c4d731-a44d-4

DateTime from view to control to Mapper

i'm trying to pass A DateTime data type to a controller that will call a Mapper to pass it into a db. Additionally the DateTime is taken from a db at first. db