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
-
As good as a mid-engine, rear wheel-drive supercar may be on a dry track or road, this is not the type of car you want to fool around when t...
-
Vehicle concepts by Mike Hill of FREEFALL GRAPHICS. Check out his ROBOTS and SHIPS. Keywords: concept art vehicle cars military transport ...
-
Only I can go from fashion week to mad max in one post but this Mad Max Bad Boy is freaking awesome. Some say we are living in the "end...
-
Map: DWP. River Supply Conduit Lower Reach 4 Improvement Project causing traffic and trouble breathing in the neighborhood north of Flet...
-
Volkswagen is sure not wasting any time at all getting the word around about the 2013 Golf Mk7 . After the Berlin presentation on Tuesday, ...
-
President Obama today announced $2.4 billion for battery and electric car manufacturing and deployment efforts. Green Car Congress has the ...
-
Photo: Diane Edwardson, January 21, 2012. Yesterday's rain sparkled on the Jade flowers in full bloom throughout the neighborhood. (Cl...
-
V8 / 6.059 cc / 435 PS / 420 ft/lb (569 Nm) @ 4.800 / 0 - 62 mph (100 km/h): 5,4 s / Vmax: 165 mph (265 km/h) Supercharged: V8 / 6.059 cc /...
-
The man doesn't know how to retire. GalleyCat reported that Stephen King will publish a new novel in November. I'm thrilled! Here...
-
We have been passed some photos which show a nightmarish distopian future for the drivers of Aberdeen Cars. These photos were taken over the...
No comments:
Post a Comment