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
-
Vadim, creator of the Tango commercial, has just graphically assembled the whole roll cage with door bars. Because the door bars were integr...
-
From the JP Slot.net store website: Universal Chassis Slot Kit to adapt 1:43 static vehicles or similar to Slot. Includes complete mechan...
-
New 7" single release is coming up on Cloudberry Records . It's by Sweden 's Youngfuck and lead track (a-side/wha...
-
It's a shame the video on TMZ.com doesn't include the reporter's voiceover, because the narration I heard when the story aired ...
-
Photo: Diane Edwardson, September 23, 2011, 6:27 PM. Here's an overexposed shot of yesterday's spider. Check out the cross and shi...
-
All the Batman vehicles On display in “The Batcave”: all six Batmobiles from television and film! For the first time ever, Comic-Con fans wi...
-
The California Air Resources Board may still be living in an alternate universe where hydrogen and fuel cell vehicles are making meaningful ...
-
There's much I should be blogging these days and hopefully will shortly. The pathetic CARB staff ZEV recommendations ( here ); Bob Lutz...
-
This retro 70's orange carpeted plushy art car is MMMM Soft. No need for air bags, no need for seat belts. During an accident you just ...
No comments:
Post a Comment