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
-
TAKEN FROM CDN: Victor was the very first student to upload an entry to the competition website. He separates the passenger compartment from...
-
Morning, Friends! If you haven't checked out Kindle Fire Department yet and you own a Kindle Fire, you are not human. I'm TELLING YO...
-
This is so brilliant (though it clearly belongs to a genre that I'd normally avoid at any cost) and brought to my attention because I Am...
-
Morning, Friends! If you haven't checked out Kindle Fire Department yet and you own a Kindle Fire, you are not human. I'm TELLING YO...
-
Photo: Diane Edwardson, December 4, 2010. Hyperion Bridge and Griffith Park are a dramatic backdrop for the Los Feliz site. (Click on phot...
-
B ill Gates has announced his plans to transition out of his role in Microsoft. It will be a two-year transition process and by July 2008, h...
-
I 've managed to solve the mystery of the missing SharePoint Workflow templates in the Enterprise Content Management Starter Kit . The w...
-
That is a barn, sometimes they are easy to distinguish, and sometimes, they look like a lot of wood in a vague pile that might have space u...
-
Photo: Diane Edwardson April 23, 2011. The LA River roared to life with Friday's rain, see photos on The Eastsider. (Click on photo to...
No comments:
Post a Comment