C#C
C#2y ago
M B V R K

System.ComponentModel.Win32Exception: 'Access is denied'

Hi guys, hope you're all doing well
I'm working on a project, which needs to
start
and kill some proccesses,
the issue is an excception always thrown when try to kill processes, and the exception always said :
System.ComponentModel.Win32Exception: 'Access is denied'

This is the file I have issue in :
https://github.com/MbarkT3STO/OfficeDRPC/blob/main/OfficeDRPCCommander/Worker.cs

The exception always happens in this part :
process[0].Kill();


All the apps including the app which contains the issue are Console targetting .NET Framework 4.7.2

Please any help or solution for this issue ?

Massive thanks in advance, with all love and respect <3
GitHub
Open-source project to show Discord Rich Presence Activities for most of Microsoft 365/Office apps - MbarkT3STO/OfficeDRPC
Was this page helpful?