Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying WCF Service on Windows Azure

Tags:

rest

c#

.net

wcf

azure

Just to clarify I am working for the first time with azure. I created a Restful WCF Service a few months ago with SQL Server connection. I deployed the WCF on IIS with the database on SQL Server Express 2012. The service works with no problems.

[OperationContract]
[WebGet(UriTemplate = "feed/{ID}/{Rating}/{Feed}", ResponseFormat = WebMessageFormat.Json)]
string feed(string ID, string Rating, string Feed);

Now I must move the WCF service to Azure. The problem is I have no idea how to deploy the WCF to azure and if it is even possible to deploy the WCF to azure. The database have been moved to azure.

like image 964
Jonathan Avatar asked Dec 14 '22 20:12

Jonathan


1 Answers

The principal is relatively easy depending on whether you want a Azure WebSite or Cloud Role - for Cloud...

  • Ensure you have the Azure SDK installed from the WebPlatform Installer.
  • Add a WCF Cloud Service Role to your project
  • Expand the out the project and right click onto the 'Roles' node selecting 'Add' and then existing project from your solution.
  • Publish the role using your Azure credentials.

These two articles provide an end-to-end tutorial that goes into more depth...

  • http://www.claudiobernasconi.ch/2013/08/03/deploying-a-wcf-service-on-windows-azure/
  • http://blogs.msdn.com/b/nishasingh/archive/2012/12/05/creating-and-deploying-a-wcf-service-on-windows-azure-and-consuming-it-in-windows-8-store-app.aspx

With this one more specific to Azure Websites

  • http://blogs.msdn.com/b/brunoterkaly/archive/2014/03/31/moving-a-wcf-service-and-database-to-the-cloud.aspx

HTH

like image 117
SeanCocteau Avatar answered Dec 30 '22 17:12

SeanCocteau