prevent "Object reference not set to an instance of an object. " when query returns no results
I have the following method of my Applicant class that runs a query and returns a string. public string GetPhoneFromSmsLog(string UserID) { using (SqlConnection oConn = new…
Testing OpenGl Graphics on Android Emulator/Device
Hi, This seems impossible. adb shell dumpsys gfxinfo Only collects around 2 frames. The Android Device Monitor's systrace appears to collect frame data, but always shows no janky frames, which is obviously incorrect given the jerky movement on…
About Location in xamarin forms
How to find if Location is turned on or off in settings through code. i have this xam.plugin. geolocator. i use this code but it is not working. IGeolocator Locator = CrossGeolocator.Current; protected override void OnAppearing() {…
Microsoft Identity Extending tables
hello I am using Microsoft identity in my asp.net core project and i extended the table AspNetUsers by inherit from it a class called appicationUsers, after that i created many tables related to my own project and linked those table with the mentioned…
In C# WPF, is there a way to make it sort to the top of the listview whenever a new item is added?
I'm making a WPF app that implements a folder explorer. And I want to add a new folder item to the top of the folder list view when the new folder button is pressed. So I put a code that adds a sortdirection to sort by date, folder, and filename. …
How can I redisplay the paragraph break vertical lines in visual studio?
I am working with visual studio 2022. However, the vertical line disappeared as shown in the picture below, probably because I pressed something wrong. However, vertical lines are visible in other code windows as shown on the right. How can I make…
Custom claims are not kept after 15 minutes
is in Hello, I developed an ASP.NET MVC application which uses ASP.NET Identity 2 and OWIN to provide authentication. All works perfectly but authentication after I changed cookie duration to 30 days (it was 15 minutes before, the default). I have…
Download Android device issue in MAUI project
I created the first project of MAUI and choose the Android Emulator. In the window of Android Device Manager, I failed to download the default device Pixel 5 - API 30 with bellow error: Network is not reachable. Please check your connection and try…
unable to deploy .net core app on a shared linux hosting
Hi, .net core app is supposed to be a multi platform app. For some reason no shared Linux hosting (like a2hosting.com) is allowing .net core app their linux shared hosting servers.
IIS Form Authentication template
Hi, perhaps someone will share the source code of the authentication web page. Perhaps there is a standard page? There is an iis resource where basic authentication is used. After opening the page, a window for entering a name and password appears.…
Visual studio publish..
so i used visual studio a while back to create simple windows form apps but now that i created one and i try to publish it / build it into a single EXE i dont get the option, i can only pick to publish it online or something or that users have to use…
RAM overflows and the application slows down, when the application is loaded with a large amount of Microsoft Access data (ADO.NET)
Hi I use the following algorithm to load data into my application. XAML: <Window.Resources> <local:DatabaseDataSet x:Key="Database_DataSet"/> <CollectionViewSource…
How to refresh the child razor component on the bases of provided text box which is resided in parent razor component (by using a razor class library)?
Hi, I need to refresh the child razor component on the bases of provided text box which is resided in parent razor component (by using a razor class library) What I want that ASAP user type 5th character or more in the textbox , a call should go the…
Why when using filcesystemwatcher and dictionary with fileinfo it's throwing exceptions on wrong key and file not found ?
Link for the repository on github : https://github.com/chocolade1972/FileSystemWatcher The project size is 92 KB only compressed with winrar. At the top i init with new instance both filelist and dic variables. Then when starting watching…
Passing multiple parameters with MessagingCenter
Hi, I got this from the Microsoft KB that allows to pass a parameter through MessagingCenter MessagingCenter.Send<object, string>(this, App.ShowPINActivation, email_address); but how can I pass two parameters like this: …
How to use IFormCollection instead of IFormFile
I have a controller that used to use the IFormFile interface, and I could CopyTo the filestream using the FileName. IActionResult Upload(IFormFile files) { var infile = Path.Combine(env.ContentRootPath, @"wwwroot\images",…
VS 2022 C# ComboBox operations using WinForms. Adding data from SQL server and later capturing selected value.
I am looking the way to allocate data from SQL server table. get 2 columns (ProductID (int) and ProductName (string) from database table into ComboBox. show only product name. Capture selected value in drop down of comboBox. The trick is to get…
Issue in Implementing Windows Authentication and LDAP in .NET 6
Hi Team, We have a intranet web api hosted in Windows box (on prem) which is consumed by our Angular UI and we need to implement Integration Windows Authentication in the API side. I was looking into the MS docs (see below url) and noticed that there…
SAP crystal reports runtime engine for .net framework 4 installation issue in windows 11
I am not able to install SAP crystal reports runtime engine for .net framework 4(32 bit Version: 13.0.3.162) in windows 11(Version: 21H2 , OS Build: 22000.556). Error Message: Product: SAP Crystal Reports runtime engine for .NET Framework (32-bit) --…
Implementing request varification tokan
I have read some articles on preventing cross site requests within an webpage by using request verification token in MVC and ASP.NET Core application. But is there a way to implement this token in a classic ASP.NET application