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
-
Writing is hard. Writing for an agent is even harder. Writing for an editor considering your book but wanting a rewrite first is like climbi...
-
Intro Ahh... My new blog spot. Loke Uei from Microsoft Malaysia has recommended me to blog here as he can't stop laughing at me for blo...
-
Golden Dream Rolls Royce with Hemmy - by Ivan Mitev Photography I stumbled upon this ostentatious golden beauty tonight and had to put it up...
-
My best mooncake award for this year goes to Baker's Cottage 's snow-skin yam mooncake! Absolutely yummy! But mom prefers her Cosway...
-
Complacency - a word usually used to describe folks who take it too easy at work and to some extent, not motivated to do better beyond '...
-
Photo: Diane Edwardson, November 1, 2011. Cat skull. (Click on photo to enlarge.)
-
I t has been one month now since I've joined Microsoft and you must be wondering how am I doing? I'm doing great at the moment and ...
-
I'm a little demotivated lately with the type of work that I'm assigned to. I feel that my skills and talents are not fully utilized...
-
One of the proposals that Ferrari didn't liked... I have LOTS of them in fact.
-
Regular readers will remember that last month we reported with fury and disbelief the upswing in recorded users of pedal cycles in Aberdeen...
No comments:
Post a Comment