Archive for March, 2009

HttpRunTime Cache vs Enterprise Library Cache

Saturday, March 28th, 2009

This post aims to highlight the differences between the cache implementation of HttpRunTime and EnterpriseLibrary

HttpRuntime.Cache
Enterprise Library Caching Block

Standard Actions

Add Item to Cache

Read Item from Cache

Update Item to Cache
(using insert)
(using add)

Delete Item from Cache

Flush all Items in Cache

Enumeration Actions

Enumerate all items in cache

Employ LINQ Expressions

Cache Dependencies

Cache Dependency – File

Cache Dependency – Other Cache Item

[...]

ASP.NET and Web Gardens

Thursday, March 26th, 2009

When you are running your ASP.NET applications inside an application pool with only 1 worker process, everything works as expected. But things usually do not go so smoothly when you run the same application inside a web garden.
What is a web garden
Simply put, a web garden is a single web server running multiple IIS processes. [...]

Custom Controls

Wednesday, March 25th, 2009

ASP.NET makes custom controls extremely easy to write, but if you are not careful, hard to manage.
There are 2 ways to create a custom control

Writing your own HTML code
Using the controls property

Writing your own HTML code
Using your own properties, you can easily write HTML code to generate the
output
e.g consider a simple scenario where you take [...]

Updating Active Directory using ASP.NET 3.5

Wednesday, March 25th, 2009

It is extremely easy to use ASP.NET to manage your Active Directory Users. This article shall list some of the common scenarios which is most frequently used.
Points to ensure

add the reference to System.DirectoryServices
The account running the website must have the appropriate access to the AD

Get Users in Group
List<UserID_CN>
result = new
List<UserID_CN>();

using (var
de = getEntry())
{
object
obj = [...]

Application Caching

Sunday, March 22nd, 2009

Introduction
ASP.NET offers several forms of caching. They are output caching, HttpRuntime.Cache and finally Enterprise Library Cache. Each of these aims to meet the requirements of different scenarios.
This article shall explore the scenarios which each of these best fit.
Output caching
There are 2 variants of output caching, you can either cache the whole page or portions of [...]