Author Archive

What’s New in Visual Studio TFS 2012

September 9, 2012 Leave a comment

While playing with new TFS which comes with visual studio 2012, i got to know that it is now having more support for agile methodologies.  Rather writing my own post about new TFS 2012, i found a very good and organized article, which describe everything with TFS 2012.

Before buy it, you can try it with . Site itself explaining new features and how to use it. i created test project under TFS Preview, created few test tasks, added few classes on VS under that task, used code review, TRIED with creating with build. Just simple test. but feel new TFS is awesome.

Windows 8

September 8, 2012 Leave a comment

I was using win 8, when they released first developer preview and uninstalled it after few weeks. Reason was it had to be improved lot. lack of usability, poor performance (even though it boot up within few seconds), etc.

recently i had to install Win 8 again for the ‘Win 8 Boot camp’ and used final release of it. (windows_8_x64) Well.. happy to say there is nothing to complain for me. it is awesome. Super fast. (i heard Microsoft rewrote the OS completely). And i was warring about removing the start button. But now i feel it is good change.  Just think how many of you guys use Start menu and go to relevant program and click it.  i have not done this for years. what i really do is click start menu and type the first few letters of what i want to open and press enter. And mostly  used apps like ‘VS’, ‘Chrome’, ‘SQL management studio’, ‘media player’ are already pinned on task bar. So no need to gor for start button. This is the reason they have removed start button and menu. So for me it is good change.

It is true that it is better with touch screen. But still without touch screen, it is not much different and not difficult to use.

There are several improvement i noticed compared to previous version of windows OS. Most of them were already available on Phones.

1. Windows Store – Similar to app store and google play

2. User login – this is bit similar to Android phones login. same as it ask for google account, Win 8 is asking microsoft user login (may be it can skip and use normal user login and password, i used my outlook login). after that same as latest smart phone works, win 8 is syncing with entered login (and if we link FB, G+,.. it will sync those all) and collecting all the contact. Those will display on people app.

3. Improvement on windows explore

4. Reset option

5. Short boot time

6. Changed task manager

I feel that future OS are more focusing in to mobile devices. Currently i am writing my first test App for win 8.

In to Thirties

September 1, 2012 Leave a comment

It is 30th birth day of myself. Not like any other birthdays or any other life events i passed, i am feeling about my parents today.

How many things they have done, they have compromise for me for these 30 years. Actually that is what they still do. (Letting their children to go away for their good, without saying any single word is the best sacrifice a parent can do, as i think).  Sometimes that sannasgala’s famous article about his mother is coming in to mind. As he explained, is this the ‘Missing time’ of anyone’s life. According to my knowledge, only what they want is been with their children. hmmmm

The idea of this post is to say

Amme, Thaththe….

I,m glad that you both are the best parent in the world i could have,   If i have succeeded in any thing i have done during last 30 years, it is all because of you and your support, kindness, patience, guidance , understanding (very specially). I am really sorry for not been with you and at least not been able to stay in the country where you are. I know, it is unfair to say “Thank you” for the effort you put to grown me up to 30 years. But… Thank you for been my parents and taking care of myself this far and expecting to be taken care of you two as your “Chooty Putha“, every day…’




Categories: Personal Tags: ,

Error 1001 while uninstalling/reinstalling Windows service

This is a good tool to resolve ‘Error1001  An exception occurred  while uninstalling. etc…  install/un-install issue’. i got this while trying to re install a windows service and even reboot the system does not solve the problem.

what you have to do is just download the tool, run and follow the instructions. it worked for me.



Categories: Software, Technical

Message Pass to Client with WCF

Recently i got a requirement to implement simple message passing from server to client machine. In my case, there is a midddleware which is running on server machine and processes  data coming from RFID tags and antennas.  Middleware should send a message to client machine as alert or popup window, when specific event is raised.

this is how i implemented that with WCF.

1. Create Alert Client project and add following classes and windows form.

Windows form – i made this to run on system tray and wait for server’s messages. this may used as windows services also.

public partial class Tray : Form

public ServiceHost serviceHost = null;
private ContextMenu trayMenu;
private NotifyIcon notifyIcon1;

public Tray()

trayMenu = new ContextMenu();
trayMenu.MenuItems.Add(“Exit”, OnExit);

notifyIcon1 = new NotifyIcon();
notifyIcon1.Icon = new Icon(SystemIcons.Application, 40, 40);
notifyIcon1.ContextMenu = trayMenu;
notifyIcon1.Icon = SystemIcons.Exclamation;
notifyIcon1.BalloonTipText = “Alert client is waiting on the system tray.”;
notifyIcon1.BalloonTipIcon = ToolTipIcon.Info;

protected override void OnLoad(EventArgs e)
ShowInTaskbar = false; // Remove from taskbar.

private void SetBalloonTip()
this.Click += new EventHandler(Tray_Load);

private void OnExit(object sender, EventArgs e)

private void Tray_Load(object sender, EventArgs e)
notifyIcon1.Visible = true;

private void LoadService()
if (ServiceHost != null)
// Create a ServiceHost for the Service type and provide the base address.
serviceHost = new ServiceHost(typeof(NotificationService));

// Open the ServiceHostBase to create listeners and start listening for messages.

Add Following 2 classes

// Define a Service Contract.
[ServiceContract(Namespace = “http://AlertClient”)]
public interface INotifyClient
/// <summary>
/// Sets the pop up.
/// </summary>
/// <param name=”alertText”>Type of the alert.</param>
/// <returns></returns>
bool SetPopUp(string alertText);

// Implement the Service Contract in a Service Class.
public class NotificationService : INotifyClient
/// <summary>
/// Sets the pop up.
/// </summary>
/// <param name=”alertText”>Type of the alert.</param>
/// <returns></returns>
public bool SetPopUp(string alertText)

AlertForm popup = new AlertForm();
popup.AlertText= alertText;

return true;
return false;

Now have to add new form as AlertForm and set a public property on it as AlertText (or can populate this while calling the form constructor)  that is it with client. now you can run this. if service is running, you could be able to access following URL.


in the server side, refer above URL and add service reference.  

just add following line of code to where you need to send messages.  (and pass the client’s ip)

string endpointConfigName = “WSHttpBinding_INotifyClient”;
string serviceAddress = string.Format(“http://{0}:8005/AlertNotifier/service”

AlertNotifierServiceReference.NotifyClientClient notify =
new AlertNotifierServiceReference.NotifyClientClient(endpointConfigName, serviceAddress);

bool success = notify.SetPopUp(“test message”);

That is It…!


P/S : Client should be run in admin mode. otherwise you will get a error.

Categories: Career, Technical Tags: , , ,

Few Changes in Life

I want to start writing again after sometime. Couple of new things on personal life.
As i wrote on previous post, sold my corolla car and after finding of months, selected Honda fitarea. It was awesome… Good fuel consumption… Got 18km per liter on outstation.. And this didn’t give me the feeling of driving auto.

But… Just after few days, got a job offer at UAE. What can i do…. Was thinking and thinking.. Finally decided to accept and move to UAE.. Anyway i wanted to keep the car and plan was to give it for rent till i come back. But last moment got a buyer and sadly sold it.

So now im at dubai…

when it comes to the career… Got good company. good peoples from different countries.. And interesting hardware related projects. Mostly working with GPS devices, RFID and RFID printers, Handheld devices, gps modem, camera..  so far so good…

Good Bye…!

January 17, 2012 Leave a comment

Previously it was my first vehicle, bike.  this time, it was my first car. it was gone last week. reason was nothing else. just upgrade. and also it was bit old now. it was very sad moment when he’s going away with my car. i used it almost 3 years. except one accident (that also hit from back), i have’t met any small accident for this 3 years. would be good for first vehicle.not even that, all the buyers said, i have taken care of the vehicle well and it’s the best condition ar they had seen so far for this aged vehicle.

but now, i  still have no idea what should i buy now. hatch back model, sedan model. any way there MUST be few things.

1. definitely it should be AUTO. (i love to drive manual. but not in colombo. 🙂 )

2. YOM should be greater than 2003.

3. colour should not be white.

4. no of owners should be less than 2.

5. Mileage (true that it would not easy to find genuine milage) should be less than 60k – 70k

that’s it. nothing much to care. will see if i get any vehicle which have above conditions true.

Good Bye AE 110.

AE110 - 301-1419

2011 in review

January 1, 2012 Leave a comment

The stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 12,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 4 sold-out performances for that many people to see it.

Click here to see the complete report.

Categories: Genaral

Search file sharing Files

Uri uri = new Uri("" +
fileNameTextBox.Text + "+site%3A" + comboBoxSite.Text);
string target = uri.AbsoluteUri;
//start browser
catch(System.ComponentModel.Win32Exception noBrowser)
if (noBrowser.ErrorCode == -2147467259)
catch (Exception other)
this is a small tool which I was thinking to write few months back. it delayed. today I got bit free time and just done it. true this is very small one. just a one line of code. Smile but as I know most of the time mediafire gave me 99% of the songs I wanted to download. and it’s the easiest site we can download any file without add and waiting issues.
so every time I used to put my search queries as “track name + Mediafire”. so here I used Google site searching option, build search query and pass to browser. (any of default browser). there you have to select the song and download.

Small Change

i just transfered personal and non technical post to another blog which i,m maintaining.  because i want this to be clean and have only non personal things. i had write some more songs recently on this blog and it is the reason to me to make this decision.  and having idea of writing more on that blog too.


Categories: Personal