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
-
ARC213 - Microsoft Architecture Vision & Direction by Gurpreet Pall Started my day with this. Was 15 minutes late but I manage to get...
-
by Rick Woodbury I've recently asked all of my facebook friends to join the Lane Sharing Cause. http://apps.facebook.com/causes/113221?m...
-
F inally found out who smsed me - it turns out to be one of my colleagues *HuHuHu* * paiseh * * paiseh * Sorry buddy, *sweating* didn't ...
-
"Arguments are 90% emotions and 10% nonsense." That's what I learnt from my trainer the other day. Most of the time, human be...
-
I was roped in to work on Active Directory these two days as the dudes in the MIS department had ran out of ideas. I was approached by my CI...
-
I've been looking into the programmable aspects of SQL Server 2005 for the past days and one of the things that interest me most is the ...
-
ARC303 - Designing and Writing Interoperable Services: The Contract First Approach by Malek Kemmou Started the day with this session. It ...
-
My rich-client saga continues today with the green-light given to my Java colleagues to proceed with Thinlet , an OSS rich-client solution. ...
-
Today is the last day of Tech.Ed. *So Sad* Went there early hoping to attend the Microsoft Business Solutions session but it was knocked off...
No comments:
Post a Comment