Category "c++sharp"

c# VSTO How to save email in ActiveInlineResponse

I have simple problem, but dont know how to figure out. My VSTO addon use Outlook for create new email. But email which user fill in the Application Outlook isn

Does not contain definition for "HasDefaultValue"

I want to set a default value for a non nullable field in code first. I have included Microsoft.EntityFrameworkCore but I'm still getting Does not contain

C# how to call an as 400 stored procedure using oledb

Hi I am trying to call an as400 stored procedure using OleDB. Could you please post an example of how to do it cause I've been following some tutorials but not

A proper way to handle WCF network related exceptions

In the application I"m working with, there is some communication with the remote service using WCF (basic http binding, no fancy stuff). Since the client is lig

Owin app with WsFederation authentication stuck in infinite redirect loop

I have an Owin app that uses Ws-Federation authentication with a SSO application (not ADFS). Whenever my Owin app receives a request, it authenticates the user

Marshaling complex C structs with c unions for C#

i am desperate to get a complex c datatype correctly marshaled for C#. I already read all the other posts regarding that topic and i am running out of ideas alt

how to set OpenSavePidMRUl default value using C#?

I have an application and I don't have access to source code. In the application, I open a OpenFileDialog to select an xml file. So, for an automation script, I

ObservableCollection count resets to 0 from second function call in Xamarin forms app

There is a Dependency class in android that has these two functions 1. public void OnEvent(Java.Lang.Object obj, FirebaseFirestoreException error) { try

C# Blazor: Countdown Timer

I'm new to C# and trying to create a simple countdown timer using System.Timer.Timers. It didn't work as expected and I searched the internet for a solution but

Net Core MemoryCache not resetting per request

.Net Core 3.0. I have a repo where IMemoryCache gets injected. Repo is registered as Transient. I would like for the cache to be cleared/reset PER request, howe

How can I use a modern Windows 10 context menu with a Win32 NotifyIcon?

My goal is to use the modern Windows 10 themed context menu with my C# application's tray icon. Eartrumpet's tray icon context menu uses it so I know it is poss

How to scan particular URL or page alone in owasp zap

I have installed OWASP ZAP 2.8.0 and scan our site fully. In result we got some SQL injection URL's or pages. So We have fixed that SQL injection issues in deve

ASP.NET Core (.Net 6) Web Application throws System.NotSupportedException when run as a service. (Service will not start)

When I attempt to run my .Net Web Application as a Windows Service, it does not start. It works if I just run the executable but mysteriously fails when attempt

Validate 5 digits in the textbox

I am trying to make the textbox valid when just the user writes 5 digits but the problem is if I for example input (11111) it will be correct, the program will

Add comments to records - C# 9

I'm looking for a way to add comments on record properties, in C# 9 When I try this code : public record Person { /// <summary> /// Gets the first

load failed UWP.csproj : error : Object reference not set to an instance of an object

My Xamarin.UWP suddenly won't load after Visual Studio 2017 15.4. I did update my Xamarin PCL and others. But the UWP Project will not load anymore. I can't g

net 5.0 Cannot determine the frame size or a corrupted frame was received

I want to try net5.0 since it's in rc2, and I've encountered a strange issue. I've created a default WebApi in net5.0. I didn't touch anything, I just clicked r

C# run python script from virtual environment

I am trying to run python script in c# with process. private void RunScript() { ProcessStartInfo processStartInfo = new ProcessStartInfo("python.exe", "c:\\

How to deal with IAsyncDisposable and IDisposable interfaces when no synchronous dispose available? [closed]

I am writing a Connection like class around an interop object. In particular, the closing of my connection is asynchronous. The object I am in

Clearing cache in Azure Function app and c#?

I'm using Azure Functions App and c# for coding. I want to clear the cache every 10 minutes for example, if there is a way to do that in the code ?