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
-
T he most common way to improve the performance of our queries to large tables containing both current and historical data is to use horizon...
-
S3 D / 799 cc / 58 PS / 81 ft/lb (110 Nm) @ 2.000 - 2.500 / turbo / Vmax: 84 mph (135 km/h) (click images for a larger view)
-
While the DS3 Cabrio may steal most glances at Citroen’s Paris Auto Show stand, the brand with the double chevron logo will also display a...
-
W3 / 3.152 cc / 330 PS / 700.000 EUR (click images for a larger view)
-
Photo: Diane Edwardson, February 28, 2012. Who knew we could have protected the wildlands of the Semi Tropic Spiritualists' Tract, just...
-
Please click here to download the new 6-page Tango brochure We're printing 50,000 brochures for the Los Angeles Auto Show where Tango(s)...
-
Mom and I remained in that windowless room with its bad art and cheap furniture. As Taxol seeped into her blood stream, I etched each drop i...
-
V12 / 5.980 cc / 630 PS / 738 lb/ft (1.000 Nm) @ 2.300 - 4.300 / biturbo / 0 - 62 mph (100 km/h): 4,0 s / 0 - 124 mph (200 km/h): 11,8 s / ...
-
In an announcement today, Ford said that the company's global CEO Alan Mulally and Ford of Europe Chairman Stephen Odell along with oth...
-
- Microsoft Windows Server 2003 R2 is now available on MSDN Subscriber downloads. - Visual Studio 2005 Team Foundation Server December CTP ...
No comments:
Post a Comment