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
-
S4 / 1.984 cc / 200 PS / 207 ft/lb (280 Nm) @ 1.700 - 5.000 / turbo / AWD (click images for a larger view)
-
Developing an enterprise layered application can be a daunting task especially when the layered samples provided, contains a barrage of Visu...
-
S4 / 1.558 cc / 120 PS / 108 ft/lb (146 Nm) @ 4.000 / 0 - 62 mph (100 km/h): 8,9 s / Vmax: 118 mph (190 km) (click images for a larger vie...
-
V8 / 4.200 cc / 440 PS / 347 lb/ft (470 Nm) @ 2.700 Vmax: 185 mph (300 km/h) (click images for a larger view)
-
Recently during a racing event at Mid-America Raceway near Chicago, Maurizio of Slot It had a prototype of the upcoming Lola that he's w...
-
If you are the kind of person who wants it both ways then welding two front ends of a car together might be your cup of tea or coffee. Or ma...
-
S4 / 1.290 cc / 75 PS / 69 ft/lb (94 Nm) @ 3.500 / 0 - 62 mph (100 km/h): 17,7 s / Vmax: 94 mph (152 km/h) (click images for a larger view...
-
you can see in a post or two http://justacarguy.blogspot.com/2012/07/batmobile-tumbler-from-batman-rises-of.html how perfectly this look...
-
Coda's got the right idea. Spied atop a gas pump in Santa Ana, California. Tip o' the hat to Al.
No comments:
Post a Comment