正在Windows Azure上部署WCF服务

本文关键字:WCF 服务 部署 Windows Azure 正在 | 更新日期: 2023-09-27 18:21:47

只是为了澄清我是第一次使用azure。几个月前,我使用SQL Server连接创建了一个Restful WCF服务。我在IIS上部署了WCF,并在SQL Server Express 2012上部署了数据库。这项服务没有问题。

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

现在我必须将WCF服务移动到Azure。问题是我不知道如何将WCF部署到azure,以及是否有可能将WCF部署在azure。数据库已移至azure。

正在Windows Azure上部署WCF服务

主体相对容易,这取决于您是想要Azure网站还是Cloud角色-for Cloud。。。

  • 请确保已从WebPlatform安装程序安装了Azure SDK
  • 向项目中添加WCF云服务角色
  • 展开项目,右键单击"角色"节点,选择"添加",然后从解决方案中选择现有项目
  • 使用您的Azure凭据发布角色

这两篇文章提供了一个更深入的端到端教程。。。

  • 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

有了这个更具体的Azure网站

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

HTH