Gzip file uploaded to Azure Blob Storage, when downloaded to Windows machine does not open and the file size is not same
I am uploading a csv file with gzip encoded to Azure Blob Storage using C# .net 8. I am able to read the file ok when I download file and read data use .Net code. But I have two problems. When I download the file to my local Windows laptop and try to…
How to view my content from my database to my home view in .Net core MVC
Hi guys SO I was learning to use .NET Core MVC through the tutorial, and I decided to take it up a notch. While the tutorial has been helpful, it did not really have what I was looking for, and surprisingly, neither do all the AI bots. So what's the…
Issue with "Mandatory" package update status in Microsoft Store
Hi, I am experiencing an issue with the Microsoft Store incorrectly reporting "Mandatory" package update status in some of my UWP applications. Following the official documentation, I implemented an update flow in my application that provides…
Prevent app from closing by task manager
I am creating an application in VS 2019. It should not be closed by task manager. For ex, McAfee does not get closed in Windows task manager even when user tries to kill it. Same logic I want to implement in my app. Should I create a C# Windows…
AppDomain.CurrentDomain.BaseDirectory is Empty While Loading Media In WPF
Hello, I am working on a WPF window which supports multiple frameworks <TargetFrameworks>net8.0-windows;net48</TargetFrameworks> i have a media element in a window written <MediaElement x:Name="Video" …
Why is CS0472 just a warning?
I found a warning CS0472 from the C# compiler. I have this in my code: List<string> list = GetList(); if (list.Count == null) // CS0472 DoA(); else DoB(); Why is it just a warning? IntelliSense tells me that this expression is always…
Issue with saving single record the form saves multiple records until the modelstate is valid
I am using asp.net core 8 i have a popup form when i click submit with empty fields it returns required validation error and when i fill data in fields then submit again it save multiple records is sql database the number of time i click on submit…
SqlDataReader error “Invalid attempt to read when no data is present”
My environment used is Visual Studio 2022 v17.12.4. Language is C# and connecting to SQL Server Express v16.0.1135.2. This is a Windows form using .Net Framework 4.8.1. I am getting the error message “Invalid attempt to read when no data is present”…
How To Print QRCode in Thermal Printer
Hi, can anyone help me with this situation? I'm in need of help printing a QR code using Xamarin.Forms (iOS and Android) (I just need the Android version). I have an Thermal Printer, and im already printing text through the BluetoothSocket, and i can…
I want to lock the current HDMI port in C# WPF (.NET Framework)?
I want to lock the HDMI port. If a HDMI port is used for a monitor then if other HDMI port is used then i want to lock existing port. How to do so in C# WPF?
Unable to Post a Message to Teams Channel with Graph API Client + C#
Hi, We are trying to post a message to teams channel, with Channel.SendMessage delegated permissions. And here is the code snippet. var options = new OnBehalfOfCredentialOptions { AuthorityHost = AzureAuthorityHosts.AzurePublicCloud, ``` }; var…
How to Disable Scrolling in a Navigation View with WindowsAppSDK
I have a WindowsAppSDK app that uses a navigation view control for navigation. For one of the pages, scrolling should be disabled, allowing the page to shrink to fit within the navigation view's content pane. How can scrolling be disabled and the page…
Windows Community Toolkit AdaptiveGridView incorrect behavior
Hi, has anyone had this problem when using AdaptiveGridView (Win UI platform). The elements do not want to expand to occupy the full width available for them in the row (I attach a photo). I'll leave you the code for setting the AdaptiveGridView so that…
In Azure Web PubSub, How to receive messages in backend microservice for processing
Requirement: My clients are using simple WebSocket connection to send messages. I want to receive these messages inside my backend .NET 8 web api and process them further to send fine-tuned data to some distributed cache services. From documentation, I…
HttpClient // Timeout // The remote name could not be resolved
Hello, The remote name could not be resolved using (HttpClient client = new HttpClient()) { client.BaseAddress = new Uri(System.BaseAddress); client.Timeout = new TimeSpan(0, 0, System.Timeout); public void Exception(Exception ex, string…
how to zoom in&out and keep picture aspect ratio?
hi I have a winform app to display a pdf file into a picturebox control. When the user presses the left mouse button and moves the mouse until the mouse is released, a line is drawn. The start and end positions of each line are stored in a list. I want…
System.IO.Ports only availble on windows, but im using windows - .NET6
So i'm trying to read arduino serial from c#, but it shows me the folowing exeption when i try to open the port: System.PlatformNotSupportedException: 'System.IO.Ports is currently only supported on Windows I am currently using windows 11. Also i tried…
How to know whether the snap applied in windows 11 windows. Is there any API.
Is there a method or any API to tell if snap is enabled or disabled in Windows 11? Please answer if there is any other way.
How to fix SystemLoadExecption
Exception has occurred: CLR/System.TypeLoadException An unhandled exception of type 'System.TypeLoadException' occurred in Winappli.dll: 'Could not load type 'Microsoft.Toolkit.Uwp.Notifications.NotificationActivator' from assembly…
The type or namespace 'SharePointOnlineCredentials' could not be found.
How do you resolve this error? I installed SharePoint.Client and SharePoint.Client.Runtime. I referenced Microsoft.SarePoint.Client in my app.