System.Threading.AccessControl 10.0.3

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package System.Threading.AccessControl --version 10.0.3
                    
NuGet\Install-Package System.Threading.AccessControl -Version 10.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="System.Threading.AccessControl" Version="10.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="System.Threading.AccessControl" Version="10.0.3" />
                    
Directory.Packages.props
<PackageReference Include="System.Threading.AccessControl" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add System.Threading.AccessControl --version 10.0.3
                    
#r "nuget: System.Threading.AccessControl, 10.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package System.Threading.AccessControl@10.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=System.Threading.AccessControl&version=10.0.3
                    
Install as a Cake Addin
#tool nuget:?package=System.Threading.AccessControl&version=10.0.3
                    
Install as a Cake Tool

About

System.Threading.AccessControl provides types that enable you to control access to threading synchronization primitives. This includes the ability to control access to Mutexes, Semaphores, and Events using Windows Access Control Lists (ACLs).

Key Features

  • Extension methods to allow ACL modifications on Mutex, Semaphore, and EventWaitHandle.
  • Simplified security management for threading synchronization objects.

How to Use

using System.Security.AccessControl;
using System.Security.Principal;

// Create a string representing the current user.
string user = $"{Environment.UserDomainName}\\{Environment.UserName}";

// Create a security object that grants no access
MutexSecurity mutexSecurity = new MutexSecurity();

// Add a rule that grants the current user the right to enter or release the mutex
MutexAccessRule rule = new MutexAccessRule(user, MutexRights.Synchronize | MutexRights.Modify, AccessControlType.Allow);
mutexSecurity.AddAccessRule(rule);

// Add a rule that denies the current user the right to change permissions on the mutex
rule = new MutexAccessRule(user, MutexRights.ChangePermissions, AccessControlType.Deny);
mutexSecurity.AddAccessRule(rule);

// Display the rules in the security object
ShowSecurity(mutexSecurity);

// Add a rule that allows the current user the right to read permissions on the mutex
// This rule is merged with the existing Allow rule
rule = new MutexAccessRule(user, MutexRights.ReadPermissions, AccessControlType.Allow);
mutexSecurity.AddAccessRule(rule);

// Display the rules in the security object
ShowSecurity(mutexSecurity);

static void ShowSecurity(MutexSecurity security)
{
    Console.WriteLine("\nCurrent access rules:\n");

    foreach (MutexAccessRule ar in security.GetAccessRules(true, true, typeof(NTAccount)))
    {
        Console.WriteLine($"   User: {ar.IdentityReference}");
        Console.WriteLine($"   Type: {ar.AccessControlType}");
        Console.WriteLine($" Rights: {ar.MutexRights}");
        Console.WriteLine();
    }
}

/*
 * This code example produces output similar to following:
 * 
 * Current access rules:
 * 
 *    User: TestDomain\TestUser
 *    Type: Deny
 *  Rights: ChangePermissions
 * 
 *    User: TestDomain\TestUser
 *    Type: Allow
 *  Rights: Modify, Synchronize
 * 
 * 
 * Current access rules:
 * 
 *    User: TestDomain\TestUser
 *    Type: Deny
 *  Rights: ChangePermissions
 * 
 *    User: TestDomain\TestUser
 *    Type: Allow
 *  Rights: Modify, ReadPermissions, Synchronize
 */

Main Types

The main types provided by this library are:

  • System.Threading.EventWaitHandleAcl
  • System.Threading.MutexAcl
  • System.Threading.SemaphoreAcl
  • System.Threading.ThreadingAclExtensions

Additional Documentation

Feedback & Contributing

System.Threading.AccessControl is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (64)

Showing the top 5 NuGet packages that depend on System.Threading.AccessControl:

Package Downloads
Microsoft.Windows.Compatibility

This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.

Microsoft.PowerShell.Commands.Utility

Runtime for hosting PowerShell

Examine.Lucene

A Lucene.Net search and indexing implementation for Examine

Microsoft.VisualStudio.Utilities

A member of the Visual Studio SDK

ABCpdf

PDF creation and manipulation using ABCpdf - a powerful and flexible PDF component for .NET. ABCpdf is a .NET component for PDF manipulation. As such, you'll find it documented for C# and VB.NET, with numerous PDF code examples and freely adaptable projects, all designed to help you get up to speed. Re-use existing skills for PDF document layout. ABCpdf supports a wide range of layout methods, including HTML-to-PDF using HTML and CSS, System.Drawing, PostScript, and a powerful set of native drawing commands. Import SVG, DOCX, XPS, EPS, the usual bitmap image formats such as JPEG, TIFF, PSD and many more. And because support for these formats is built-in, ABCpdf makes light work of PDF related document conversion tasks. C# HTML to PDF conversion using HTML and CSS pages from local or remote web sites. Placed HTML support means your HTML can be treated just like any other media - placed wherever you like on your PDF page. Choose between the Chrome style, FireFox style and Internet Explorer style HTML rendering engines. Support for modern web pages using HTML5, CSS3, FontAwesome and similar modern web technologies. A vast range of options gives you full control over the HTML rendering process and DOM. ABCpdf is a robust component, with probably hundreds of thousands of live installations, and almost two decades worth of support and development. But should you ever need help our PDF expert support team are on hand. ABCpdf is fast. ABCpdf does not use a printer driver. Instead it goes Direct to PDF™, generating PDF documents on the fly. And fully multi-threaded, ABCpdf is suitable for use with ASP.NET. ABCpdf supports Unicode and foreign languages, CJK fonts, and right-to-left text such as Arabic and Hebrew, kerning, tracking and contextual ligatures. ABCpdf supports sophisticated color spaces. Mix and match RGB, CMYK, Grayscale, Lab, calibrated color spaces and spot colors. Any kind of graphic from text to lines to blocks of color can be drawn in in any of these color spaces. You can even perform complex operations like colorizing grayscale images using spot colors or converting from one color space to another. PDF optimization and size reduction provides whole document optimization using a variety of options to reduce font sizes, remove embedded fonts, to resample and recompress images, to flatten wherever possible for the smallest possible output. PDF analysis has been extended into easy-to-use operations for text and images. Simple on the surface but sophisticated underneath, they allow you to extract common-sense, de-hyphenated and de-ligatured text from PDFs. Then select items of that text within the PDF and perform operations on those selections. PDF accessibility is now something that can be supported, even for PDFs which were never designed to do so. Standards such as PDF/UA and Section 508 compliance require that PDFs be accessible. Our accessibility operation performs a sophisticated semantic analysis of the document content and adds appropriate tagging information to produce an accessible Tagged PDF output. Download and try out ABCpdf for free. All our components include a 30-day trial. During the trial period, ABCpdf operates as the unrestricted Professional edition.

GitHub repositories (23)

Showing the top 20 popular GitHub repositories that depend on System.Threading.AccessControl:

Repository Stars
PowerShell/PowerShell
PowerShell for every system!
dotnet/runtime
.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
gerardog/gsudo
Sudo for Windows
microsoft/AttackSurfaceAnalyzer
Attack Surface Analyzer can help you analyze your operating system's security configuration for changes during software installation.
dotnet/macios
.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
madelson/DistributedLock
A .NET library for distributed synchronization
praeclarum/FuGetGallery
An alternative web UI for browsing nuget packages
RazorGenerator/RazorGenerator
A Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.
Shazwazza/Examine
A .NET indexing and search engine powered by Lucene.Net
metalama/Metalama
A meta-programming framework for code generation, aspect-oriented programming, and architecture verification of large C# codebases.
pdfforge/PDFCreator
PDFCreator - The free PDF Converter
VSadov/Satori
Experimenting with dotnet runtime.
haga-rak/fluxzy.core
Fast and fully streamed Man-On-The-Middle to intercept, record, impersonate and alter HTTP/1.1, H2, websocket traffic over plain or secure channels.
EvanMulawski/FanControl.CorsairLink
The unofficial CorsairLink plugin for Fan Control. Adds support for Corsair controllers, liquid coolers, and power supplies. An alternative to iCUE.
MercuryWorkshop/celeste-wasm
Browser port of Celeste (2018) and Everest using WebAssembly
valdisiljuconoks/LocalizationProvider
Database driven localization provider for .NET applications
HardwareMonitor/OpenHardwareMonitor
Open hardware monitor - system sensors monitoring application for Windows
mann1x/CPUDoc
ITHit/UserFileSystemSamples
IT Hit User File System Engine samples in .NET/C#. Samples implement Virtual File System for Windows and Mac with synchronization support, on-demand loading, offline files, and Windows File Manager integration.
kamilbaczek/Modular-monolith-by-example
Modular monolith architecture example in .NET. Estimation Tool is tool to optimize estimation process in IT company.
Version Downloads Last Updated
11.0.0-preview.1.26104.118 0 2/10/2026
10.0.3 0 2/10/2026
10.0.2 81,599 1/13/2026
10.0.1 97,407 12/9/2025
10.0.0 151,262 11/11/2025
10.0.0-rc.2.25502.107 3,216 10/14/2025
10.0.0-rc.1.25451.107 6,906 9/9/2025
10.0.0-preview.7.25380.108 3,130 8/12/2025
10.0.0-preview.6.25358.103 4,535 7/15/2025
10.0.0-preview.5.25277.114 6,083 6/6/2025
10.0.0-preview.4.25258.110 2,020 5/12/2025
10.0.0-preview.3.25171.5 3,942 4/10/2025
10.0.0-preview.2.25163.2 4,163 3/18/2025
10.0.0-preview.1.25080.5 1,577 2/25/2025
9.0.13 0 2/10/2026
9.0.12 13,685 1/13/2026
9.0.11 54,101 11/11/2025
9.0.10 370,961 10/14/2025
9.0.9 337,315 9/9/2025
9.0.8 243,613 8/5/2025
9.0.7 90,693 7/8/2025
9.0.6 355,213 6/10/2025
9.0.5 152,705 5/13/2025
9.0.4 473,664 4/8/2025
9.0.3 137,684 3/11/2025
9.0.2 257,011 2/11/2025
9.0.1 484,063 1/14/2025
9.0.0 1,648,634 11/12/2024
9.0.0-rc.2.24473.5 30,906 10/8/2024
9.0.0-rc.1.24431.7 8,667 9/10/2024
9.0.0-preview.7.24405.7 6,156 8/13/2024
9.0.0-preview.6.24327.7 916,346 7/9/2024
9.0.0-preview.5.24306.7 5,779 6/11/2024
9.0.0-preview.4.24266.19 2,990 5/21/2024
9.0.0-preview.3.24172.9 7,664 4/11/2024
9.0.0-preview.2.24128.5 1,193 3/12/2024
9.0.0-preview.1.24080.9 33,387 2/13/2024
8.0.0 16,600,935 11/14/2023
8.0.0-rc.2.23479.6 1,041,017 10/10/2023
8.0.0-rc.1.23419.4 9,934 9/12/2023
8.0.0-preview.7.23375.6 17,316 8/8/2023
8.0.0-preview.6.23329.7 1,570 7/11/2023
8.0.0-preview.5.23280.8 2,005 6/13/2023
8.0.0-preview.4.23259.5 10,155 5/16/2023
8.0.0-preview.3.23174.8 20,453 4/11/2023
8.0.0-preview.2.23128.3 5,740 3/14/2023
8.0.0-preview.1.23110.8 8,322 2/21/2023
7.0.1 4,120,017 1/10/2023
7.0.0 2,403,706 11/7/2022
7.0.0-rc.2.22472.3 9,887 10/11/2022
7.0.0-rc.1.22426.10 63,131 9/14/2022
7.0.0-preview.7.22375.6 10,975 8/9/2022
7.0.0-preview.6.22324.4 1,446 7/12/2022
7.0.0-preview.5.22301.12 1,588 6/14/2022
7.0.0-preview.4.22229.4 11,802 5/10/2022
7.0.0-preview.3.22175.4 2,813 4/13/2022
7.0.0-preview.2.22152.2 12,045 3/14/2022
7.0.0-preview.1.22076.8 3,261 2/17/2022
6.0.1 102,460 11/12/2024
6.0.0 16,360,955 11/8/2021
6.0.0-rc.2.21480.5 5,213 10/12/2021
6.0.0-rc.1.21451.13 9,040 9/14/2021
6.0.0-preview.7.21377.19 4,050 8/10/2021
6.0.0-preview.6.21352.12 6,301 7/14/2021
6.0.0-preview.5.21301.5 5,851 6/15/2021
6.0.0-preview.4.21253.7 19,933 5/24/2021
6.0.0-preview.3.21201.4 8,029 4/8/2021
6.0.0-preview.2.21154.6 8,436 3/11/2021
6.0.0-preview.1.21102.12 16,647 2/12/2021
5.0.0 31,663,191 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.5 10,438 10/13/2020
5.0.0-rc.1.20451.14 4,660 9/14/2020
5.0.0-preview.8.20407.11 10,431 8/25/2020
5.0.0-preview.7.20364.11 18,756 7/21/2020
5.0.0-preview.6.20305.6 3,789 6/25/2020
5.0.0-preview.5.20278.1 4,228 6/10/2020
5.0.0-preview.4.20251.6 8,351 5/18/2020
5.0.0-preview.3.20214.6 48,915 4/23/2020
5.0.0-preview.2.20160.6 22,282 4/2/2020
5.0.0-preview.1.20120.5 2,738 3/16/2020
4.7.0 20,763,871 12/3/2019
4.7.0-preview3.19551.4 4,510 11/13/2019
4.7.0-preview2.19523.17 16,322 11/1/2019
4.7.0-preview1.19504.10 10,232 10/15/2019
4.6.0 2,604,864 9/23/2019
4.6.0-rc1.19456.4 5,378 9/16/2019
4.6.0-preview9.19421.4 3,347 9/4/2019
4.6.0-preview9.19416.11 872 9/4/2019
4.6.0-preview8.19405.3 6,429 8/13/2019
4.6.0-preview7.19362.9 11,715 7/23/2019
4.6.0-preview6.19303.8 40,057 6/12/2019
4.6.0-preview6.19264.9 856 9/4/2019
4.6.0-preview5.19224.8 34,463 5/6/2019
4.6.0-preview4.19212.13 2,137 4/18/2019
4.6.0-preview3.19128.7 7,740 3/6/2019
4.6.0-preview.19073.11 17,011 1/29/2019
4.6.0-preview.18571.3 19,482 12/3/2018
4.5.0 45,120,816 5/29/2018
4.5.0-rc1 70,246 5/6/2018
4.5.0-preview2-26406-04 31,324 4/10/2018
4.5.0-preview1-26216-02 39,221 2/26/2018
4.5.0-preview1-25914-04 324,444 11/15/2017
4.4.0 7,333,179 8/11/2017
4.4.0-preview2-25405-01 1,840 6/27/2017
4.4.0-preview1-25305-02 5,072 5/9/2017
4.3.0 649,494 11/15/2016
4.3.0-preview1-24530-04 12,897 10/24/2016
4.0.0 3,626,311 6/27/2016
4.0.0-rc2-24027 21,867 5/16/2016
4.0.0-beta-23516 2,148 11/18/2015
4.0.0-beta-23409 1,788 10/15/2015
4.0.0-beta-23225 1,816 9/2/2015
4.0.0-beta-23123 2,034 7/29/2015
4.0.0-beta-23109 1,875 7/27/2015
4.0.0-beta-23019 2,080 6/30/2015
4.0.0-beta-22816 2,239 4/24/2015
4.0.0-beta-22605 2,782 2/13/2015