Latest Entries »

I am going to dedicate next few posts to understanding and using Entity Framework  Code First approach.

If you are new to EF Code First then read on…

If your start writing a data model using code first  approach. At some point after designing your model classes, you have to create Context.  Context coordinates Entity Framework functionality for a given data model. You create this class by deriving from the System.Data.Entity.DbContext class.

If you have not installed Entity Framework before working with DbContext then I must tell you that you need to reference EntityFramework.dll to access DbContext class. And easiest way to do that is by using the Library Package Manager if you have it (it installs automatically with MVC 3.0).

From within your project in Visual Studio 2010,

Go to Tools > Library Package Manager > Package Manager Console.

In the console, after the “PM>” prompt,


install-package entityframework

And Voila!!! Code Compiles…



Recently helped one of my friend experiencing issue while publishing website ( to a shared hosting server. Website had few managed Http Handlers to create Image Thumbnails / add watermark on images etc, worked perfectly in local IIS but never worked on published website.

By default, when you add a managed handler, the handler will run only in application pools configured to use Integrated mode. Published website was running under Application Pool in Classic Mode (which pertains to IIS 6.0), so handlers were never registered with IIS and hence never run.

So if you guys run into same situation, make sure to check that hosted website is running under correct Application Pool (Integrated Mode in our case).

Hope it helps…