deploying an existing wcf service to azure

22
Deploying an existing WCF service to Azure Advaiya Solutions

Upload: advaiya-solutions

Post on 07-Aug-2015

128 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Deploying an existing WCF service to Azure

Deploying an existing WCF service to Azure

Advaiya Solutions

Page 2: Deploying an existing WCF service to Azure

Deploying an existing WCF service to Azure

If you want to use Azure as a deployment server for your existing WCF service, then one way is to create an ‘Azure cloud service’ project from inside cloud project template in Microsoft Visual Studio and then copy all the code manually from WCF service to the Azure cloud service project.

Or, you can take advantage of the hosting services and scalability of Azure, by which the existing WCF service can be easily converted to Azure cloud service with minimal changes using Microsoft Visual Studio.

Page 3: Deploying an existing WCF service to Azure

To convert an existing WCF service to ‘Azure cloud service’, Azure tools need to be installed in Visual Studio.

If Azure SDK is not installed on your machine, then you will see an option to install Azure on launching of Visual Studio and selecting ‘Cloud’ project template. To install Azure, follow the steps as below:

1. Open Visual studio 2. Select File, New Project 3. Select Visual C# or any other node from installed templates4. Select the ‘Cloud’ project template5. If you haven’t installed the Azure Tools, then it contains a

project template named ‘Get Microsoft Azure SDK for .NET’ as highlighted in red

6. To download the Azure tools select ‘Get Microsoft Azure SDK for .NET’ option and click OK button. It will open an Azure Tools tab

7. To start the download, click the ‘Download Azure Tools’ button to open the web installer. Now follow the instructions as provided by web installer to install the latest version of Azure tools and the Azure SDK.

Page 4: Deploying an existing WCF service to Azure

After the successful launch of Visual Studio, select ‘Cloud’ project template. See the list of all Azure cloud project templates including ‘Azure Cloud Service’ project template to start working with Azure projects as below:

Page 5: Deploying an existing WCF service to Azure

Now, let us see how to convert an Existing WCF service to Azure cloud service:

1. Open your existing ‘WCF service’ project and then right click on the project.2. Move to ‘Convert’ option and then click ‘Convert to Microsoft Azure Cloud

Service Project’.

Page 6: Deploying an existing WCF service to Azure

3. It will create an ‘Azure cloud service’ project using your existing ‘WCF service’ in the same solution as below.

Page 7: Deploying an existing WCF service to Azure

4. Now for deployment, build your Azure cloud service and then right click on the Azure project, click Package.

Page 8: Deploying an existing WCF service to Azure

5. It will create a package file and a configuration file which need to be deployed to Azure. After creating these files it will automatically open the file explorer, where you can view those files. Save this file path as it will be required at the time of deployment.

Page 9: Deploying an existing WCF service to Azure

6. Now to publish this ‘Azure Cloud service’, Open Microsoft Azure and login with your credentials.

Page 10: Deploying an existing WCF service to Azure

7. After logging into Azure, navigate to the ‘Cloud Services’ tab as highlighted

Page 11: Deploying an existing WCF service to Azure

Select:Compute Cloud Service Quick create.

Provide the URL for the new service. This complete URL

(in this case - TestCloudService.cloudapp.net) will be used to browse the service later.

8. Create a new cloud service and click on‘+ New’ at the bottom.

Page 12: Deploying an existing WCF service to Azure

9. URL name should be unique and it will display a green tick if the name given is available, as below.

Page 13: Deploying an existing WCF service to Azure

10. Click ‘Create Cloud Service’ in the bottom right, the newly created cloud service will be listed with already existing services inside ‘Cloud services’ tab.

Page 14: Deploying an existing WCF service to Azure

11. Click on the newly created service and then click on ‘Dashboard’ tab.

Page 15: Deploying an existing WCF service to Azure

12. Click ‘UPLOAD A NEW PRODUCTION DEPLOYMENT’ and provide deployment label

Page 16: Deploying an existing WCF service to Azure

13. Browse for the package & configuration files from the location where we have created the package in step 5.

Page 17: Deploying an existing WCF service to Azure

14. Check both the checkboxes and click the tick mark in bottom right.

Page 18: Deploying an existing WCF service to Azure

15. It will start deploying the cloud service, the progress can be checked in the details section below.

Page 19: Deploying an existing WCF service to Azure

16. It will display a success message after the successful creation of the cloud service. Also, it will display a failure message if any error occurs in between.

Page 20: Deploying an existing WCF service to Azure

After successful deployment of the cloud service, you can browse the service and check it using the URL displayed in the SITE URL section. Now the service is ready to be called from inside your application.

Page 21: Deploying an existing WCF service to Azure

ADVAIYA SOLUTIONS PVT LTDG14-17, IT Park, MIA ExtensionUdaipur, India 313002Phone : +91 (294) 305 1100Fax : +91 (294) 305 1300

ADVAIYA SOLUTIONS, INC.2475 152nd Ave NE,Redmond, WA 98052Phone : +1 (425) 256 3123Fax : +1 (425) 256 3123

Contact Us

[email protected] www.advaiya.com/blog/

Page 22: Deploying an existing WCF service to Azure