Two Approaches to Searching Users in Active Directory

Source: Two Approaches to Searching Users in Active Directory Thu, Oct 18 2018 I’m sure there are more than two ways to perform searches against Active Directory, however I wanted to highlight two approaches: DirectorySearcher and PrincipalSearcher. The former, DirectorySearcher comes from System.DirectoryServices and it’s the more “bare-metal” version of the two. PrincipalSearcher, of System.DirectoryServices.AccountManagement provenance, is more of a query by example pattern and I’d … Read moreTwo Approaches to Searching Users in Active Directory

People are struggling with .NET Async

Source: I didn’t understand why people struggled with (.NET’s) async Long story short (I know that some readers love a TL;DR), I have almost always worked with async/await in C# projects where it’s been async from top-to-bottom and so I’ve rarely tried to start integrating async code into a large project that is primiarily non-async. Due … Read morePeople are struggling with .NET Async

What is IIS Impersonation

Source: ASP.NET Impersonation Another important security feature is the ability to control the identity under which code is executed. Impersonation is when ASP.NET executes code in the context of an authenticated and authorized client. By default, ASP.NET does not use impersonation and instead executes all code using the same user account as the ASP.NET process, … Read moreWhat is IIS Impersonation

8 Ways You can Cause Memory Leaks in .NET

Source: Any experienced .NET developer knows that even though .NET applications have a garbage collector, memory leaks occur all the time. It’s not that the garbage collector has bugs, it’s just that there are ways we can (easily) cause memory leaks in a managed language. Memory leaks are sneakily bad creatures. It’s easy to ignore … Read more8 Ways You can Cause Memory Leaks in .NET

What is the difference between parameter and argument?

Source: Source: A parameter is a variable in a method definition. When a method is called, the arguments are the data you pass into the method’s parameters. public void MyMethod(string myParam) { } … string myArg1 = “this is my argument”; myClass.MyMethod(myArg1);   906 A parameter is the variable which is part of the method’s … Read moreWhat is the difference between parameter and argument?

What are the various WPF binding modes?

Source: OneWay: Use this when you want the bound property to update the user interface. TwoWay: This has the same behavior as OneWay and OneWayToSource combined. The bound property will update the user interface, and changes in the user interface will update the bound property (You would use this with a TextBox or a Checkbox for example.) OneTime: This has the same behavior … Read moreWhat are the various WPF binding modes?

What is Windows 10 N and KN

Source: Source: Due to a ruling for anti-competitive practices by the European Commission in 2004, Microsoft has been forced to maintain special editions for its Windows operating systems. Labeled “N” for Europe and “KN” for Korea, these editions include all the base features of the operating system but without Windows Media Player and related technologies … Read moreWhat is Windows 10 N and KN

Command to collapse all sections of code?

Taken from: CTRL + M + O will collapse all. CTRL + M + L will expand all. (in VS 2013 – Toggle All outlining) CTRL + M + P will expand all and disable outlining. CTRL + M + M will collapse/expand the current section. CTRL + M + A will collapse all even in Html files.

ReaderWriterLockSlim Class in C# Threading

Source: Introduction ReaderWriterLockSlim class is new to .Net Framework 3.5 and is a replacement for the older ReaderWriterLock class. Problem with ReaderWriterLock The problem with ReaderWriterLock is with its implementation. Several experts have slammed this technique and found that outside of limited scenarios, it is actually far slower than the Monitor.Enter method used to get an exclusive lock. ReaderWriterLock gives higher priority to reader threads … Read moreReaderWriterLockSlim Class in C# Threading