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
-
This wooden Harley made from 4x4 pieces of wood is for the rider who is tough as nails.
-
I have just gotten a MacBook Pro for work and like all the other notebooks before it, the first thing I would do is to install Windows Serve...
-
Carloft Berlin, 10 loft suites + 1 panorama loft penthouse (click images for a larger view)
-
No technical specification available (click images for a larger view)
-
V8 / 3.523 cc / 335 PS / 381 lb/ft (517 Nm) @ 3.650 / supercharger (click images for a larger view)
-
I'm a sexy mix between the The Multi-tasker and the All-the-Timer/Compulsive/Voracious/Anything Goes Reader. What are you? What Kind ...
-
On your behalf; on behalf of the hard-pressed tax-farmed motorists of the car-driven economic powerhouse that is Aberdeen "City and Shi...
-
Two quick recommendations sent my way by the always reliable J.A. Probably no coincidence that one of the tracks by Sweden ’s Alpaca Sport...
-
Recently, I cyber-chatted with lovely Italian blogger Serena Gobbo over at her site, Librini (little books). We covered writing, books, mult...
No comments:
Post a Comment