Intermittent Connection Timeout issue
We have built a .Net Core 8.0 based project in which we are calling an external api every 5 mnts. Everytime this code is invoked , it will fetch around 50 records and create the payload in json object and do a PostAsync call to th external url. I am…
Trying to run C#, C# Dev Kit on MacBook Pro Version 11.7.10, visual studio code Version 1.90.2 (Universal)
Hi. I started to learn C# and trying to run it on visual studio code. Does not work. When I press F5, i get a pop up window with "Internal error in the debugger. Open 'launch.json' or Cancel", launch.json: { "version":…
Delete Rows from existing excel using OpenXml
I need to delete certain rows from an excel file which is created based on a template using openXml and may have extra rows at the bottom. I tried to remove it using row.Remove() and re-assign the RowIndex for the remaining rows .But nothing succeeded . …
How to Store AES Encryption Keys Securely in Windows Application?
Hello I am doing AES encryption in an application I developed in Windows. For this, I need to store Key and IV values securely. What method is used for this? If these values are not present at the start of the application, I am thinking of…
Number of query values and destination fields are not the same
Hello friends, I received text (.txt) files from our external vendor every morning. My objective is to convert this text files to excel (.xlsx) per our customer's request. I am using SSIS Package, and I am using Script Task to do my conversion from text…
How Can I fix lParam pointer Error in Pinvoke/Win32 ?
Hi there, currently I need to dig up some Win32 code which is a part of my project, Actually, it's a part of my WPF application where access Win32 APIs using the traditional Pinvoke method. But Currently I facing some error at lParam pointer…
How Can I call RuntimeHostConfigurationOption OnStartup of a WPF (C#) application in .NET 8?
Hi there, I have a WPF application where the UI is a very important thing and heart of the application. Due to some UI elements requirements I have some custom RuntimeHostConfigurationOption which I put in my WPF application through the *.csproj file. I…
How can I upload x86 and x64 directories to github?
HelloBa I uploaded my project to github. However, I created a Lib folder in the directory where the project file is located. There are x86 and x64 folders in it. This directory is not uploaded to the repository. How can I include this directory and its…
Explain The C# Code
using System; using System.Collections.Generic; using System.Linq; public class Program { public static void Main() { Console.WriteLine("Hello World"); var nums = new List
Regex.Matches Idn
Hello I'm using this to collect emails from string: Dim mc As MatchCollection = Regex.Matches(src, "([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,9})", RegexOptions.CultureInvariant Or RegexOptions.IgnoreCase Or…
Unable to make full screen splash in .NET MAUI
How can I make splash to display in full screen instead of just at the center of the mobile screen in .NET MAUI? I've tried different base sizes, but not working. Target android version up-to 13. <ItemGroup> <MauiSplashScreen…
How can I create a clean project folder structure?
Hello I use many libraries that I downloaded from Nugget in a wpf c# project. These libraries are normally located under the "Bin" folder. I want to create a cleaner folder structure. For this, I want to collect these libraries under a folder…
How to make the Popup control in WPF ignore mouse events
I want to implement a function: display Popup when the mouse enters the Grid, update the Popup position when the mouse moves, and close Popup when the mouse leaves the Grid. This is my current xaml and cs: MainWindow.xaml <Window…
Problem with DisableProcessing()
I'm trying to prevent a control from being rendered in Wpf because it takes too long to process the items. Since I haven't been able to achieve this, I'm now trying to prevent the screen Form from being rendered. After doing…
how to return value from popup table to the C# asp.net code
Hi, On clicking a button on UI, we have to show a dialog or Popup Table on the center of the screen asking user to enter integer value of area(Mandatory) when one condition is met, then user clicks Ok(which has captureAreaVal() function in my script as…
DateTime.ParseExact returns today if date string and format are set to "General"
During troubleshooting, I came across this weird behaviour which occurs when parsing text to create a DateTime object in C# (in .Net Core 8.0). Can anybody explain why the following statements return today's date when I would have expected them to…
Connection Manager not getting Iniialized
Hi, I'm currently writing a C# code in Script Component which is making a connection to MSSQL DB using ADO.NET Connection Manager. But it returns a NullReferenceException every time when I run it. I have tried the sample code as mentioned in the link …
Unable to fetch some group properties via C# SDK
I am trying to fetch groups via graph api and get resourceBehaviorOptions and resourceProvisioningOptions properties. Eventhough these properties exist in the direct graph api response, I am unable to find them when I use c# graph SDK. I can see these…
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 =…