Save Energy !!! – Why ATMs are so cool…

Hi All,

Today I have visited an ATM. The cooling inside was too good. Dont you think that, it is waste of energy and money. There are lot of regions in our country, who are facing electricity crisis.

I firmly believe, if we want a better life, we are the only one who has to come forward and act accordingly. Switching off AC in ATM can be a small step forward in this regard. I dont find any technical reasonof using AC in ATM ( Because there are lot of ATMs, where AC is not in working condition for a long time. Most of them are SBI :) )

What do you think ? Have your say in comments.


Best Regards,

Mahin Gupta

Global.asax – using directive, Debugging

A quick ASP.Net tip

1) If you want to use any custom namespace or class in your global.asax you can use following syntax to use corresponding namespace.

<%@ Import Namespace="TristonFramework.Web" %>


<%@ Import Namespace="System.Web" %>


2) When you put a breakpoint in Global.asax and if it not firing than consider following tips

   a. Make sure you are using Debug environment ie <compilation debug="true">

    Warning : make sure you have switched compilation element to false before using the web.config in production. Otherwise it has a huge performance panelty. You can read about it here.

b. Try to edit the Global.asax by just hitting few enters in blank space. Sometimes when Global.asax is not changed after last build, does not consider it for debugging. i dont know why ? But this trick works almost always.


Thanks and Regards,

Mahin Gupta

Remote Desktop : Hamachi + VNC [ Deadly combination ]

Hi folks,

Sorry for this so late post. Actually was very busy with some management stuff in my company and had a very tight schedule.

Any ways, so introducing Hamachi + VNC.

If you need to access a remote computer on Network trust me VNC is one of the best in the business. Just install VNC ( Server + Viewer ) and bingo… You are ready to access a desktop remotely.

But problem comes when you are not on same network or say you want to access a computer over Internet. Now hamachi comes into the picture. Hamachi creates VPN ( Virtual Private Network ) between few computers.

We will go step by step :

Step 1: Download and install VNC.image

You can download VNC from following locations :

VNC website :

Filehippo :

You can find Steps to install VNC here

Want to know more about RealVNC… go here

Step 2: Download and install Hamachi. 

You can download Hamachi from following locations:

From LogMeIn Hamachi Site :

FileHippo :1)

You can find steps to install Hamachi here. This article also contains how to create a Virtual private Network between two computers.

Step 3: Create VPN between two compuers using Hamachi.

With the help of this article create VPN between two computers.

Step 4: Do Remote Desktop using VNC Viewer.

After creating VPN start VNC Viewer on one machine( machine A ) from which we want to control other machine ( machine B ). In Hamachi Network right click on machine B and click Ping. See you are getting ping correctly or not. If you are not getting Ping correctly than machine B might have some firewall or antivirus kind of thing which is blocking your commands. Solve this issue.

When you get ping correct, again right click on Machine B in Hamachi Network and click Copy Address

In VNC Viewer give this copied IP Address as Server name, and hit Ok. Nowyou will get password screen. If in Machine B VNC Server you have set up a password than give that password here. If You have not given any password than leave it blank, and hit Ok.

Magic………… Now you are controlling Machine B from Machine A…. :).


Few other uses of Hamachi. It basically gives an IP address to your machine accessible to all other machines on same network. It means that suppose you have developed one web site on your machine and you want to demo it to your client who is not on same network or say is accessible only through internet, you can use Hamachi effectively. Just setup a VPN using Hamachi with your client. Give hom URL to your site with servername as your IP Address on Hamachi Network. :)

Other Players In Remote Desktop :

I love TeamViewer. image

But its free version is for evaluation purpose only and terminates the session after some times.


eMail Forwards – Spare a second to save your friends

Hi All,
We all love this forward messages and we welcome them since they work as a little refreshment in our busy work schedule.
But we need to be little responsible and careful when we send this forwards to our friends.
Please take care of following two things to honor privacy of our friends who share their eMail address with you and trust you.
1) Always do bcc. Never send a forward using plain To: field. Everyone can see to whom you are sending the mail and he has access to all eMail addresses to whom you have sent this mail.
Use bcc instead which makes recipient list as anonymous.

2) Before hitting Send please spare a second to remove all forward information from the eMail which contains eMail addresses of previous sender and all the to,and cc recipients.
Also check if user's has put their signature at the end of mail or not since normally users put their mobile No.S and where they work also in signature( Sometimes these signatures are automatically appended by Mail server ). If signature is there then remove all the signatures. This is very important.

3) Let the subject line indicate Fw: or Fwd:
This will help recipient  to differentiate if the eMail is Forward or a Text. He can also use filters ( gMail ), Rules ( Outlook ) to categorize eMails as Forwards.
Follow this steps since they will hardly take few seconds and you will save your beloved friends from being victim of social engineering or tele callers or spammers.

Note : You can forward this eMail but please make sure you have followed above steps.
I have also published it as a blog entry in my blog. If you want to say anything regarding this please send me a comment on my blog or reply this mail.

Fruitfultime – Monitoring, Analytics, and Enhancement of Productivity

Hi All,

Again I have found a great pair of magicians who allow me to check how productive I am.

Introducing Fruitfultime.


I have implemented following process in my office.

1. Every developer machine will have fruitfullTime installed.

2. Every machine will have Firefox installed with the plugin ScreenGrab image_8

3. Now FruitFullTime runs silently in task bar for whole day. Whenever you want to see the usage of time, just click on fruitFulltime iconimage_12 in taskbar and it will Show you a page in your browser ( We have Mozilla Firefox as default browser ) containing hell lot of statistics about your usage of computer today.

This is the example screen from their web site ( I can not show my screen for the reason of privacy ;) )

Using these stats I exactly know now how much time I am giving to bloody gTalk,gMail. I really surprised by knowing the amount of time I spend on gTalk.

4. Everyone will do ScreenGrab at the end of day for FruitFullTime statistics page and will mail it to one eMail Address.

I know I have created a work around to use a great system for free, but I will definitely try to purchase its Business edition as soon as it will be available.


You can check some reviews about it here.

You can  Download it from following location.


Best Regards,

Mahin Gupta


Typing speed – I enjoyed it a lot

I found Speedtest tool from rahul tyagi's blog. Its also interesting how I found his blog.

I wanted to know the meaning of word Masakalli  used in a song of upcoming Rakeysh Mehra movie Delihi -6.

I was not able to find the meaning of it but found this and loved it. So publishing it.

Catch : Actually on first attempt I got 48 words per minute but exactly when my time was getting finished I pressed backspace to correct a word and bingo, I found myself on the previous page. Beware of that.



35 words


Yet, if any one knows meaning of masakalli please let me know ;)

You can post your speeds also in the comments.. cant wait :)

LinkDom – The ultimate link kingdom – Issue 1

1. Ultimate List of Free Windows Software from Microsoft!70F64BC910C9F7F3!1231.entry?wa=wsignin1.0&sa=516393780

Really a great collection. After checking these you will not have to go for third party utilities for small little windows tweaks. I loved Open Command Window Here.

2. 10+ tools to save yourself in School

The bonus was interesting :)

3. Are My Sites Up ?

Good small tool to make sure your all web sites are up and serving the cause.

4. WhisperBot

Send and receive confidential notes securely and its free..

5. NoScript – FireFox Plugin image_thumb

If you want to know why I suggest you this and suggest you in BOLD fonts then please check the following blog posts. ( Please check comments section also )

Advice : Please check your gMail Filters if you have clicked and visited any links in these blog posts.

PhotoFunia … The ultimate fantasy machine :)

So introducing PhotoFunia. image_thumb_1

Put your face on any given image. It is amazing. They use face detection technology, and my my, magic.

1. Select and effect from gallery. These are basically collection of images there algorithm can process.


2. Select your photo, make sure to check My photo should not be available to the public, if you dont intend to do so.


3. Bingo….  You got your photo there.. now you are also a celebrity :)



There are lots of images from which you can choose…


I will give : 4/5

Superb work. They are doing just too good job.


Thanks and Regards,

Mahin Gupta

Checking Internet Connection

So basically there are 3 ways to do it. We will check each of them and will find the best out of them.

 1) Send WebRequest

                private static bool IsInternetConnected()
            HttpWebRequest req;
            HttpWebResponse resp;
            bool bRet = false;
                req = (HttpWebRequest) WebRequest.Create("");
                resp = (HttpWebResponse) req.GetResponse();
                bRet = resp.StatusCode.ToString().Equals("OK");
            catch (Exception exc)
                bRet = false;
                // resp.Close();
            return bRet;

Remarks : You need System.Net namespace to use HttpWebrequest and HttpWebresponse.


2) InternetGetConnectedState()  – wininet api


       private static bool APIInternetGetConnectedState()
            bool bRet = false;
                int Desc = 0;
                bRet = InternetGetConnectedState(ref Desc, 0);
            catch (Exception exc)
                bRet = false;
            return bRet;

Remarks : You need to create extern function to use this api and have to use runtime interop assemblies. So you need to reference namespace  

        System.Runtime.InteropServices and include following code in your class definition.

        private extern static bool InternetGetConnectedState(ref int description, int ReservedValue);


3 )InternetCheckConnection – wininet api

        private static bool APIInternetCheckConnection()
            bool bRet = false;
                bRet = InternetCheckConnection("", 0x01, 0);
            catch (Exception exc)
                bRet = false;
            return bRet;

Remarks : You need to create extern function to use this api and have to use runtime interop assemblies. So you need to reference namespace  

        System.Runtime.InteropServices and include following code in your class definition.

        private extern static bool InternetCheckConnection(string description,int flags, int ReservedValue);


Comparision :

Table shown below compares all the methods. Interestingly InternetGetConnectedState() reports connected even if we are not connected to Internet, and that is very natural since it has no way to detect if you are connected to actual Internet ( ie particular server ) unless you send a request to web server. You can find a good explanation about it here.Again you have to use interop services to use both this api which can cause performance issues.

Using Google server as server to request has also pros and cons. 1) Google is used heavily – but again it effectively uses CDN, so I don't think this argument holds a point. 2) You are almost very sure that Google server will be up and running in almost all circumstances, but yet for the sake of precaution use this as parameter and get it from either Database or App.Config

So after all of this for the time being I will go with Method 1 ie by using Send Web Request.

Method No Connection Connected to Intranet Connected to Internet
Send WebRequest false (0 ms) false (0 ms) true (550 ms)
InternetGetConnectedState false ( 30 ms ) true ( 0 ms ) true ( < 10 ms )
InternetCheckConnection false ( more than 2 seconds ) false ( 400 ms ) true ( 78 ms )


There exist other methods also to check Internet connectivity ie Create a socket connection to Web server, Use Ping or tracert, Open a telnet connection but many of this can create problems when firewall is on. yet, I am still interested in finding a better method than this. Please let me know if you know one.


Best Regards,

Mahin Gupta

Picasa -3 ….. Space eater

I wanted to install Visual Studio 2008 -SP1 , and it requires mind blowing 5.61 Gigs of space. :(

Again I ran out of space, so I have started to work on getting my C:\ space back again, and I got one more culprit, thanks to WinDir

Picasa !!!

We all know Picasa scans our computer and prepares its own database. it uses "C:\Documents and Settings\Mahin Gupta\Local Settings\Application Data\Google\Picasa2\db3" path for this.

I checked it and it was almost 900 MB.

I tried to search on Internet how can I change this location, I checked registry also but the bad news is that you can not change this location.

So what i have done ?

I just copied all *.db files from "C:\Documents and Settings\Mahin Gupta\Local Settings\Application Data\Google\Picasa2\db3" to one temporary location. Now my C:\ has more 900 MB space.

Now if I open Picasa, then it will again ask you to rescan your computer because it has no database now. I forcefully killed picasa process ( Because there is no way to stop it in that screen ). once again copied all the *.db files into "C:\Documents and Settings\Mahin Gupta\Local Settings\Application Data\Google\Picasa2\db3"  folder. Now again I opened picasa and bingo!!! all my images are back.

I will use this work around for the time being until google announces picasa version which let us to change image db location, till then watch this space.

I have also added this in my post where I have listed few steps of how to reclaim your c:\ space