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
-
SAN FRANCISCO—The site of a former San Francisco shipyard will be transformed to an international center focusing on green technology and gl...
-
No technical specification available (click images for a larger view)
-
C heckout the following WSS and Office SharePoint Server 2007 clinics: Inside Look at Developing with Microsoft® Windows® SharePoint® Servic...
-
1 I sat in the waiting room of Orleigh Tremaine Newman – a Whole Person Corporation. The space stank of old coffee, onions and lavender perf...
-
Time: 6:50 a.m. Temperature: 46 degrees Meal: Biscuit and coffee Goal: To read through chapters, highlighting clunky and passive language. W...
-
As the cliche goes: I am over the Moon! And! And! You don't even need the Kindle device to read it. Go to the book's page on Amazon...
-
One of the proposals that Ferrari didn't liked... I have LOTS of them in fact.
-
Slava's blogspot. Keywords: tecnical 3d three dimensional cargo transport renders based on modular transforming chassis concept semi tru...
No comments:
Post a Comment