How to install Active Directory && Connect to AD using C#

  using System; using System.DirectoryServices.AccountManagement; namespace AD1 { class Program { static void Main(string[] args) { ActiveDirectory ac = new ActiveDirectory(); Console.WriteLine(“Login : ” + ac.Login(“[email protected]”, “x”)); Console.WriteLine(“Search For eramax : ” + ac.Search(“eramax”)); Console.WriteLine(“Search For [email protected] : ” + ac.SearchByEmail(“[email protected]”)); Console.WriteLine(“Print All Users in AD” ); ac.GetAllUsers(); Console.ReadLine(); } } public class ActiveDirectory { private static string […]

Installing and Configuring Web Deploy on IIS 8.0 or Later

Download the Web Platform Installer. Open Web PI. Select the Web Deploy that you want, and then click Add. On the Prerequisites page, click I accept. After the installation has completed, click Finish.   Using the IIS Manager to configure Web Deploy for a Non-Administrator The following steps configure publishing on an existing site for an existing user using the IIS Manager UI. Start […]

ASP.NET MVC 5: Using a Simple Repository Pattern for Performing Database Operations

Abstract: The Repository pattern decouples your ASP.NET MVC application and shields it from changes by creating a boundary between your data access code and the other parts of your application. Recently a client of mine asked for a solution to isolate the direct dependency of the Data Access Layer with the rest of the layers of the application. In […]

How to Implement the Repository Pattern in ASP.NET MVC Application

The Repository Pattern is one of the most popular patterns to create an enterprise level application. It restricts us to work directly with the data in the application and creates new layers for database operations, business logic, and the application’s UI. If an application does not follow the Repository Pattern, it may have the following problems: Duplicate database […]

async/await – What You Should Know

Introduction Sometimes, we use new technologies while we are not aware of the bottlenecks and weird parts of that technology which eventually might trap us in bad situations like deadlocks which may be really hard to track. What exactly happens in Task-based Asynchronous Pattern (TAP), what are the improvements since .NET 4.0, how may we introduce a deadlock and […]

Dotnet-Boxed Very good asp.net template

.NET project templates with batteries included, providing the minimum amount of code required to get you going faster. https://github.com/Dotnet-Boxed/Templates Technology Map The ASP.NET Core API project template contains the following features: Optional Feature Selection The ASP.NET Core API project template uses dotnet new to enable you to turn features of the project template on or off. Literally everything can be […]

What is the Difference Between a DTO and a POCO?

First off, I’m not the authority on DTOs, POCOs, object oriented architecture, or really anything now that I stop to think about it.  However, I do use a DTO / POCO centric architecture whenever I can and there’s at least one former client of mine who is now saddled with an entity class named DevicePoco (there was already […]