0
votes

I am very new to windows azure and need to create a restful wcf application. What I have done is I created a new cloud project by adding one asp.net web role and one wcf web role together to my project. I wrote some restful services in my wcf project. The problem I am facing now is how do I call or consume the wcf service from my asp.net web role. I used to follow call restful services using

HttpResponseMessage response = new HttpClient().Get(currentServiceUri)

but I cannot refer microsfot.http library to my asp.net web role.

Please let me know how to call my wcf service? Am following the correct approach? if not please correct me..

Thanks, Sreelal

2

2 Answers

0
votes

I'm not completely sure if I understand you correctly, but consuming WCF services (REST, SOAP, Binary, or whatever) is the same on WIndows Azure as it would on any other environment.

If you reference assemblies that are not present in Windows Azure, you just need to reference them and set Copy Local to True. That should work.

Regards,

Patriek

0
votes

There is some good information about WCF here: http://meronymy.blogspot.com/2010/04/first-experiences-creating-azure-wcf.html

Also, one easy way to do it is to publish the WCF service to Azure, then in Visual Studio you can add a Web Reference and point it to the Azure WCF service. That should add everything you need.