Concurrency vs Multi-threading vs Asynchronous Programming : Explained

Recently, I was speaking in an event and I asked a question to the audience in between my talk about Asynchronous programming , I found that some of the people were confused between multi-threading and asynchronous programming and some were saying that both are same. So I thought of explaining these terms and add one more term Concurrency. Here there are two concepts involved and both are completely different, First – Synchronous and  Asynchronous programming and second – Single threaded and multi-threaded applications. Each programming model (Synchronous and Asynchronous ) can run in single threaded and multi-threaded environment. Let’s discuss these in detail.

Synchronous Programming model – In this programming model, when a thread assigned to one task and start executing. Then completes the executing task then able to take up another task. In this model, it can not leave the executing task in between to take up some another task. Lte’s discuss how this model works in single and multi-threaded scenario.

Single Threaded – If we have couple of tasks to be worked on and the current system provides a single thread which can work all those, then it takes one by one and process as

singlethreadedHere we can see that we have a thread (Thread 1 ) and four tasks to be completed. Thread starts processing one by one and completes all. (The order in which tasks will be taken up, does not affect the execution, we can have different algorithm which can define the priorities of tasks)

Continue reading


Leverage output caching with IIS7.X and IIS8.X

Caching is one of key items that is being discussed whenever we talk about the performance of a web application. We always to use caching as a primary tool while designing and development of a web application. ASP.NET itself supports different kind of caching for handling various scenarios. Although we talk about it a lot, but I have seen that it is not implemented properly at most of the applications

I’ll not talk about it in detail about Caching in this post. Although I wrote an article on this topic in detail on long back, you can refer it for getting more information

State management and ways to handle Cache in a Web Farm/Web Garden scenario

Note : As this post was written long back (Apr 2011) some of part of could be old and may not be relevant in the current scenarios.

Let’s comeback to the topic. There are different ways to implement caching and one of the caching technique is called Output caching. But let’s understand that what is output caching?

Continue reading

Looking into Windows authentication at Web.config and at IIS

Hello All,

I have seen many confusion around setting authentication mode as windows in web.config and enabling  Windows authentication at IIS.

First thing that there is no relation between setting authentication mode as windows at web.config and enabling/disabling (Integrated)Windows Authentication at IIS.

Continue reading

Failed to access IIS metabase

Few days back, I formatted my system due to some virus.. Then again installed OS and VS2008 for my learning.I am in habit of using integrated webserver with Visual studio.

But later,I thought of deploying one WCF service. So when I deployed my service and tried to access, It started barfing me.This was running smoothly prior to formatting my system.

I kept trying to resolve this issue but it took a lot of time.Finally it started running as earlier.

Root Cause: Acually after installation of my OS Windows XP, I installed .net framework and Visual studio.Then when I needed IIS, I installed it.

Cause was, ASPNET user does not had sufficient rights over IIS

Solution:Install aspnet using command aspnet_regiis -i as

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -i

then reset iis using iisreset command in command propmpt..

it should work now..

Happy .neting