Access a share by it’s DNS alias name

On the DNS server

1. Open DNS
2. Create an A record with the name you want and the IP address of the server that you want to alias
3. Close out and make sure you can ping this new alias from another machine
4. If you cannot ping, refresh the DNS changes manually by using ipconfig /flushdns

On the Windows Server

1. Open regedit from Run or Command Prompt
2. Navigate to HKEY_Local_Machine\System\CurrentControlSet\Services\LanmanServer\Parameters
3. Add or Edit DWORD "DisableStrictNameChecking"
4. Change the value to 1

Restart the server. You should now be able to access the server using it’s DNS alias.


Flickr favorites (12-16-2009)

Paris Underground Gardens of Luxembourg. Paris.- Arc De Triomphe (Paris) in 1000 MegaPixels (Zoom in) Notre Dame de Paris Place du Tertre, Paris Paris spring

The images attached in this post are random selections from flickr.com and are not my work. You may need to obtain authorization from the owner on flickr.com before using them.


How to stop hotmail from opening Messenger

This issue has been bothering me for some time now and I have finally figured it out. Every time I check my hotmail, live emails, IE automatically starts MSN Messenger. It does not log me in, just opens it and sits there and I have to close it every single time.

Here are the steps to disable it:

1. Open Internet Explorer

2. Under Tools > Manage Add-ons, highlight “Windows Live” and click the Disable button (If Windows Live does not appear, change the Show drop-down to All add-ons)

3. Close Internet Explorer and login to hotmail again. Messenger should not launch anymore. It will show you an alert in IE about an add-on being disabled, just ignore it.


The girl who silenced the world for 5 minutes

This is an older video but must watch for everyone.


Flickr favorites (12-08-2009)

Jefferson Memorial US Marine Corps Memorial Hello, boss? I'm going to be late... Autumn in Washington DC Harvest moon Blue US Capitol

The images attached in this post are random selections from flickr.com and are not my work. You may need to obtain authorization from the owner on flickr.com before using them.


Return of the Blog

It has been over a year and a half since I last blogged. Most of my interaction during this time has been through Twitter, Friendfeed and to a much lesser extent Facebook. About a year back I started experimenting with Microsoft Azure (then in early beta). That experiment never came to fruition taking a toll on my blogging endeavors. My original plan was to migrate this website from running on my local computer to Azure, but technical issues and lack of focus left the blogging code in a limbo because of which I never finished migrating the entire code. Being online on Twitter and Friendfeed also lowered the urgency. This may now make sense to some of you who have seen a blank home page. I will write more about the Azure experience in a future post.

Fast forward to two days back, I decided this website needs a major overhaul given that Microsoft Azure didn’t work for me. It is for small businesses that do not want to spend time, money and IT resources into building their own server rack. My goal was to spend as little money as possible and yet have the ability to play with the latest web technologies with little to no underlying complexity. After doing some basic research, I decided to go with Go Daddy's hosting service. It’s cheap, it has IIS7 with ASP.NET 3.5 and it gave me the ability to create a SQL Server database (2GB maximum size). My past experience with Go Daddy’s SQL Server wasn't very good so I dumped the idea, you can read more about it in my previous post “Migrating to Godaddy.com”.

As of now my blog is running happily on Go Daddy servers and I don't have to keep my machine running all the time. I spent the last weekend rewriting the blog engine in ASP.NET MVC and cleaning up the interface. It was one of the most productive weekends ever. I got my feet wet in ASP.NET MVC, I put on a designer hat and changed the blog theme, and I got my website up and running. Go Daddy had the option to connect to their SQL Server using SQL Server Management Studio. I didn’t have to use their web based interface any more. The entire backend migration was very easy.

There is still work to be done. One of the ideas I have is to import around 700+ tweets from my twitter account and display it on my blog. I am not sure of this yet. The other idea is to display a Flickr stream of my recent favorites using the Flickr API, an idea I got from Friendfeed. That may be a project for next weekend.


Flickr favorites (01-14-2009)

dVan Nutcracker HBW 1983... (a merman I should turn to be) rufus castle christmas shopping Whelkome to Weymouth

The images attached in this post are random selections from flickr.com and are not my work. You may need to obtain authorization from the owner on flickr.com before using them.


How to force SSL on your ASP.NET website?

I have seen may implementations of forcing SSL on websites that require changes to IIS and creating dummy aspx pages for the redirect, but nothing beats the simple and elegant code that follows:

Courtesy: IKOSoftware

// Force SSL
//
Uri currentUrl = System.Web.HttpContext.Request.Url;
if (!currentUrl.IsLoopback)
{
    if (!currentUrl.Scheme.Equals(Uri.UriSchemeHttps, 
                                  StringComparison.CurrentCultureIgnoreCase))
    {
        // Build the Secure Uri
        //
        UriBuilder secureUrlBuilder = new UriBuilder(currentUrl);
        secureUrlBuilder.Scheme = Uri.UriSchemeHttps;
    
        // Use the default port.
        //
        secureUrlBuilder.Port = -1;
    
        // Redirect and end the response
        //
        System.Web.HttpContext.Response.Redirect(secureUrlBuilder.Uri.ToString());
    }
}


Must know technologies

Following are the technologies I believe are the future and want to learn but not finding the time for:

  • Workflow Foundation: The reviews of this are really really good and people are saying, nothing can beat the designer for this.
  • Windows Communication Foundation: Microsoft has unified the way two processes communicate, be they on the same box or on a remote client/server. We don't have to decide between .NET Remoting, Web Services, Message Queues, Distributed Transactions and a few other related technologies anymore. The basics of WCF are that you create a service and add endpoints to it. If you want a remote .NET client to communicate with it, you add a TCP endpoint (which is equal to .NET Remoting). If you want a Java client to communicate with it, you add HTTP endpoint (which is equal to Web Services). Note that the service remains the same, you only need to keep adding endpoints which reduces code duplication / complexity.
  • .NET Framework 3.5: This has a lower priority as it is not out yet but the additions that Microsoft is making to the framework are pretty interesting. The biggest proof that it is interesting is the fact that Sun is taking a few pages from .NET 3.5 for the next version of it's framework Wink. (Note: Microsoft itself is taking a lot of ideas from open source projects like Hibernate)
  • Windows Presentation Foundation: This has the lowest priority on my list but I find it the most interesting. Future windows applications are going to be built on top of this technology. GDI+/WinForms are past it's maturity and WPF is taking it's place. However people are not just going to run and make WPF apps. I see over the next two years a lot of small companies coming out with WPF followed by the big boys.

Update: I had Java on my list but scratched it off after a lot of reading over the past few days. The reason being that there are so many different directions you can take within Java that getting my head around it is in itself a big challenge. Hence I have decided to teach myself more of the .NET stuff instead of trying to be on two ships at the same time.


.NET vs Java

I have been reading about the Spring Framework, Hibernate and the Java world in general for the past couple of days. Trust me when I say I am reading about Java just out of curiosity and nothing else Smile.

Here is what I have learnt so far:
With .NET Microsoft took the approach of making it very very simple for developers from the get go. Most .NET applications feel like writing shopping cart applications Smile. They did not add any high level complex APIs and kept the entire platform very very developer centric and simple.

With J2EE Sun took the exact opposite approach and made the platform Enterprise level which resulted in developers having to learn EJBs which from what I have read required a lot more work to get even simpler projects done. This lead to the creation of the Spring Framework, which adds some neat technologies such as Inversion of Control and Aspect Oriented Programming to POJOs (Plain Old Java Objects). I imagine .NET to be like POJOs when I write code.

The end result is that these two technologies are moving towards each other (.NET scaling upwards and JEE scaling downwards in terms of simplicity) and are going to clash/meet somewhere in between.

I think the existing .NET 3.0 framework (which includes Windows Workflow Foundation and Windows Communication Foundation) and .NET 3.5 framework (which adds OR Mapper like Hibernate) right into the framework, while J2EE coming up with frameworks like Spring to simpify Java development is a good indication of this.


On the tooling side I was really surprised to read that Eclipse was more powerful than Visual Studio. I work day in and day out of Visual Studio and never imagined anything more powerful, but after reading some of the features of Eclipse I think we can be a lot more productive if VS had those features.

To name a few:

  • Refactoring: Hands down the refactoring support in VS 2005 is pretty lame and may be about 5% of what Ecllipse can do.
  • Type search. If you want to search for some class that is sitting in some third party assembly, you can find that just by hitting Ctrl+Shift+T and typing the first few letters. The tool will take you straight to the class if source code is available else will take you to the type definition.
  • Automatic imports statements: As you type your code when you reference a class that is not part of the using statements at the top, Eclipse will automatically add it. It will also remove those statements when your code no longer uses any of the classes in that namespace.

There are a lot more, but I forget them Sad. I will try to find the link where I read the differences and update this post.

Having said that I think the refactoring support in Visual Studio 2007 due this year end will improve dramatically. Just by the looks of it, it appears that MS just threw in basic refactoring into VS 2005 at the last movement. The beauty about VS 2007 is that it will target multiple .NET versions (2.0, 3.0 and 3.5). So you can write .NET 2.0 code in VS 2007 with all the productivity benefits they add to that release.