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
-
There has never been a shortage of stories in the press denigrating plug-in electric cars. Why? Because people naturally, logically believe ...
-
V12 / 5.576 cc / 385 PS / 406 ft/lb (550 Nm) @ 4.000 / 0 - 62 mph (100 km/h): 6,6 s / Vmax: 155 mph (250 km/h) (click images for a larger ...
-
Beautiful new video by Stars for the equally beautiful single Changes (taken from the album The Five Ghosts ). Be warned! If you don't...
-
Vadim, creator of the Tango commercial, has just graphically assembled the whole roll cage with door bars. Because the door bars were integr...
-
S4 / 1.998 cc / 116 PS / 121 lb/ft (164 Nm) @ 4.500 / 0 - 62 mph (100 km/h): 11,1 s / Vmax: 113 mph (182 km/h) (click images for a larger view)
-
anyone ever see a little ram decal in the lower left corner of a tailgate like this one? Well, it's got a story, and thanks to Jeff at ...
-
S6 / 1.986 cc / 170 PS / Vmax: 149 mph (240 km/h) (click images for a larger view)
-
Why are even the smartest journalists unable to get beyond the hype when it comes to automobiles and alternative fuels? David Pogue has a r...
No comments:
Post a Comment