Load testing Web API using Apache JMeter

Posted by Anuraj on Thursday, September 5, 2013

.Net .Net 4.0 ASP.Net Web API

Load testing is the process of putting demand on a system or device and measuring its response. Load testing is performed to determine a system’s behavior under both normal and anticipated peak load conditions. It helps to identify the maximum operating capacity of an application as well as any bottlenecks and determine which element is causing degradation. This post is about Load testing the ASP.Net Web API using Apache JMeter. The Apache JMeter desktop application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance. You can download JMeter from here.

Self hosting Web API controller

Posted by Anuraj on Wednesday, September 4, 2013

.Net .Net 4.0 Web API Windows Forms

This post is about self hosting your Web API controller. Similar to WCF, Web API can be hosted either on IIS or in Windows Process, can be a windows application or console application or a windows service. Self hosting can be used for unit testing purposes also, instead of mocking can use the in memory server. In this post I am hosting the web api in a console application.

How to authenticate user against active directory

Posted by Anuraj on Wednesday, September 4, 2013

.Net .Net 3.0 / 3.5 .Net 4.0 Windows Forms

While developing an intranet application, I had to use Active Directory to authenticate the users. I thought I might need to use WMI. But I found a simple solution using PrincipalContext class from the System.DirectoryServices.AccountManagement namespace. You can use the ValidateCredentials() method. You need to pass the domain name as one of the parameter to this function. Here is the snippet.

Unit testing ASP.NET Web API Controller

Posted by Anuraj on Tuesday, September 3, 2013

.Net ASP.Net ASP.Net MVC Entity Framework Unit Testing Web API

This post is about unit testing Web API controller. As we are using Entity Framework and some Web API related classes, we need to implement dependency injection to unit test Web API controllers.

Performing CURD operations using Web API – Part 3

Posted by Anuraj on Sunday, September 1, 2013

.Net ASP.Net ASP.Net MVC Entity Framework Web API

I couldn’t complete this series without mentioning the model validations part. Like normal services you can do custom validations, if validation fails, can create error responses and return. Similar to ASP.Net MVC, WebAPI also supports Model validations using DataAnnotations. And in the code you can use ModelState.IsValid property to validate Model is valid or not. For the validation purposes I modified the Employee model class like this.

Performing CURD operations using Web API - Part 2

Posted by Anuraj on Sunday, September 1, 2013

.Net ASP.Net Entity Framework Web API

In the last post we implemented CRUD operations with Web API. According to HTTP method definitions, all the HTTP requests should return a HTTP response, which consists of

Performing CURD operations using Web API

Posted by Anuraj on Saturday, August 31, 2013

.Net ASP.Net Web API

This post is about creating a HTTP service for CRUD operations using ASP.Net Web API. CRUD stands for “Create, Read, Update, and Delete,” which are the four basic database operations. Many HTTP services also model CRUD operations through REST or REST-like APIs. For this post I am using simple Employee model class.

Copyright © 2017 - Anuraj P. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Hosted with ❤ by GitHub