All Toolbox Options Greyed in Visual Studio 2022
I have recently upgraded my WinForm C# application from .Net 4.7.x to .Net 6 I wish to make a change to one of the Forms, however when I try to add any control to any form, I find that all options are greyed out in the Toolbox, so I can modify any of the…
How to get current User outside of Controller in another layer
In ASP.NET Core 6, I need to get the current user in service layer This is code: public class ServiceModel { private readonly IHttpContextAccessor accessor; public ServiceModel(IHttpContextAccessor accessor) { this.accessor =…
the sample console app from the emulator to create a database is throwing error
Hello, I'm downloaded and trying to execute the sample console app for database creation for Azure cosmos emulator. However it throwing me the below error. IOException: Unable to read data from the transport connection: The I/O operation has been…
using readAllBytes throws "file not accessible error"
I trying to read an encrypted file using the following: and getting access not allowed error. // would prefer to use the following instead of picker" // AuthFile = @"C:\vbscripts\pid.txt"; // if…
c# UWP resource directory DataTemplate with x:DataType not working
HI, using VS2022 UWP c# I am trying to put a DataTemplate into a ResourceDictionary using a x:DataType I get a compile error Severity Code Description Project File Line Suppression State Error The XAML Binary Format (XBF) generator reported syntax…
Graph API and Announcing mandatory multi-factor authentication for Azure sign-in
How to avoid having problems with: getting the presence of Teams user using graph api. In C# by using access token for webchat. I do not want to get effected by the MFA forcing. In other words: How to bypass MFA for multi-tenant azure app using graph…
when get data from procedure exist on PostgreSQL it show not exist although it exist?
I create stored procedure on PostgreSQL as below CREATE OR REPLACE PROCEDURE app_sec."app_perm_sp_pkg$get_all_tenants"( IN p_tenant_cur refcursor, OUT p_status integer, OUT p_status_desc text) I try to get data by call sp from PostgreSQL…
Read and save data from C# app onto SharePoint
For security reasons, our business is required to maintain a visitor control log to track when external guests enter and leave the premises. When our infrastructure used to have on-prem file/storage servers, I had written a simple app that enabled the…
Call backgroundWorker
I creating simple permutation code using c# app. Now I want to display a simple progressbar. Now if the program execute I want to check if the background is busy else I call the backgroundworker and show how many percent remaining. The code below I call…
I got two error in the MAUI project when I try to run the project
Below I attached the error message and screenshot: Severity Code Description Project File Line Suppression State Error APPX0002 Task 'WinAppSdkGenerateAppxPackageRecipe' failed. The specified module could not be…
Using Renegotiation in C#
Hi All, We have a WPF application built on .Net Framework 4.8. This application acts an HTTPs client. We are currently using the code provided in the attached file for HTTPs communication. This code is used to run a sequence of commands one after…
Android Emulator waiting for debugger to attach in .net maui app
I upgraded my .net maui app from .net 7 to .net 8 and updated my nuget packages. I built the output solution but deployment was not successful as I had received the error message:- Xaml XC002 erro: Binding could be compiled if x:datatype is specified…
What is the easiest way to manage JSON data in C#?
Thank you for this very helpful forum. I have this API request that is a GET request and it returns a massive JSON text. So, what is the easiest way to make the JSON file properly formatted and usable? This is what the code looks like, by the way, that…
Disable Control Render
In WPF I have a control to load titles but the control is very slow to render on screen. I have been told that I can use BeginInit() of the control to add the items and not render them. How do I use it if the control has already been initialized and is…
How to connect to Azure Service Bus through Private Endpoint?
I'm developing an application in our organization using C#/.NET(8.0) and have to use Azure Service Bus. My access in our organization's Azure account is mostly read-only, so I don't know actually how they created the instances. But I can see that the…
What is the proper way to declare a Microsoft class to use in my code.
What is the proper way to declare a Microsoft class to use in my code. The quick and dirty way I am doing it here, I know, is not correct Microsoft SharePoint.Client.List newList = null; I think it is something like…
SuspendLayout to Form and Control
In WPF I have a task that executes a function that loads about 150 titles into a DevExpress NavBar control and a ComboBox. The function takes a long time to finish and it seems that it is because the NavNar control takes a long time to render all the…
Is it possible to disable the new "top-level-statements" compiler configuration, which obfuscates and makes the language less transparent?
It makes no sense to have top-level statements - it would have been better to have the console app auto-generate the boiler-plate console app with a Main() method, the same way a boilerplate HTML file can be created quickly. The language was consistent…
Using IDENTITY_INSERT with FK_ChildTable_ParentTable?
Hello, Wrapping SaveChanges with ON and OFF works fine with individual tables. But not in case of a parent-child relationship where a foreign key exists. Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert explicit value for identity column…
How to set PerMonitor DpiAwareness for .NET 8 Windows desktop application in WPF?
Hi, I am having problem setting WPF window based desktop .NET 8 application to work as PerMonitor DpiAware. System default automatic scaling schema... When user changes Windows 10 display setting scale, WPF-Window is being scaled accordingly. Also,…