.NET C# Java Javascript Exception


The problem

Let’s say you have a .exe application builded from Visual Studio and the application always needs to be run from an administrator account. Windows Vista introduced the “User Account Control” (UAC) and such applications are marked with a special “shield” icon like this:


To build such an .exe you just need to add a __“application.manifest” and request the needed permission like this:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

Step by Step for .NET Framework apps

Create your WPF, WinForms or Console project and add a application manifest file:

The file itself has quite a bunch of comments in it and you just need to replace

<requestedExecutionLevel level="asInvoker" uiAccess="false" />


<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

… and you are done.

Step by Step for .NET Core apps

The same approach works more or less for .NET Core 3 apps:

Add a “application manifest file”, change the requestedExecutionLevel and it should “work”

Be aware: For some unkown reasons the default name for the application manifest file will be “app1.manifest”. If you rename the file to “app.manifest”, make sure your .csproj is updated as well:

<Project Sdk="Microsoft.NET.Sdk">



Hope this helps!

View the source code on GitHub.

.net web csharp asp.net javascript html5 asp.net-mvc jquery css iis
Weitere News:
1 Meinung
A Custom Writing Company should offer legitimate College Research Paper Services, Cheap Custom Research Paper Services and high quality Custom College Paper Services.
Schreibe einen Kommentar:
iis css jquery asp.net-mvc html5 javascript asp.net csharp web .net
Entweder einloggen... ...oder ohne Wartezeit registrieren
Passwort wiederholen