Have been experimenting with hosting a WCF service in a Worker Role for days and I am so happy that I finally managed to get it working on the Cloud. I basically relied on the WindowsAzureRoleCommunication lab that came with the Windows Azure Training Kit for guidance.
It was silly (and greedy) of me to try to host a HTTP endpoint in a Worker Role. Now, that it is on TCP, everything works fine. Sigh! Still a lot to learn ^_^'
Anyway, I didn't like the idea of defining the service programmatically, so I proceeded to use the app.config file in the Worker Role but included these lines of code in the host instead:
RoleInstanceEndpoint tcpEndpoint = RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["tcpIn"];
_svcHost = new ServiceHost(typeof(ExpenseService),
new Uri(String.Format("net.tcp://{0}/ExpenseService",
tcpEndpoint.IPEndpoint)));
where tcpIn is defined in the csdef file.
Home » Windows Azure » My Worker Role is Alive!
Popular Post
-
Have been hooked on Zuma lately (an online game provided by MSN). Never imagined that such a simple game can be so addictive. Previously, I...
-
Have you ever been handled over an abandoned system where you have no idea of it and asked to maintain or complete it? Lately, there were s...
-
The task of delivering software solutions on-time and on-demand has become a great challenge for many project teams nowadays with businesses...
-
Have been learning up NUnit nowadays and trying to use it for my Paladin project. It is a nice tool and I strongly encourage you to use it...
-
"Too many cooks spoil the broth" As the famous saying goes but will too many developers spoil the code ? It actually depends on ...
-
Have you ever wished to be able to work from home? You know like, sitting on that nice comfy chair (or slumber on the bed), listening to the...
-
Just returned from an adhoc night-out with Cherine (Buttercup). She has been craving for a Pocket PC for the past weeks and when I called he...
-
Just came back from watching The Village. Not sure on how to comment about the movie. The feeling I had is like you went into the cinema and...
-
I managed to get a colleague to give an unofficial preview on the upcoming O2 product line-ups today. Fans of O2 will definitely appreciate ...
No comments:
Post a Comment