July 25, 2009

Beta program AD Webservice and Powershell

I just came across this today...read about it here

July 24, 2009

Windows Powershell 2.0 RTM

Yup! Here is the link! Is is finally official.

July 23, 2009

Get LeapYear using C#

Someone asked me yesterday how to figure out if is a leap year in c# code. It is actually not that complicated and here is how you would do it:
public static bool IsLeapYear(DateTime date)
int year = date.Year;

if (year % 400 == 0)
return true;
else if (year % 100 == 0)
return false;
else if (year % 4 == 0)
return true;
return false;
Check for it this way:
public static int DaysInYear(DateTime date)
return IsLeapYear(date) ? 366 : 365;

July 22, 2009

What is Windows Azure?

Well in short, it is a cloud platform. I came across this really cool "hand drawn" video of this...take a look.

July 21, 2009

App_Offline.htm file

Yesterday, we were testing something with our load balancer. Although we usually have a file that our load balancer would normally recognize to offline a site, it was not working. Since the site was a .NET 2.0 site (I think this would apply to 3.5 as well), I told our ops people about the App_Offline.htm file. Basically, this allows you to take a site offline and send users a friendly message. All you need to do is create this file and put it into the root of your website. The idea is that ASP.NET recognizes this file and shuts down the app-domain for any requests it gets and instead forwards requests to this static page. This is a helpful feature that not too many people know about.

July 20, 2009

Mastering Powershell

Tobias Weltner has just released a free Powershell book called "Mastering Powershell". You can read more about it here.

July 19, 2009


Wow action packed this morning :)