deploying an existing wcf service to azure
TRANSCRIPT
Deploying an existing WCF service to Azure
Advaiya Solutions
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.
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.
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:
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’.
3. It will create an ‘Azure cloud service’ project using your existing ‘WCF service’ in the same solution as below.
4. Now for deployment, build your Azure cloud service and then right click on the Azure project, click Package.
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.
6. Now to publish this ‘Azure Cloud service’, Open Microsoft Azure and login with your credentials.
7. After logging into Azure, navigate to the ‘Cloud Services’ tab as highlighted
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.
9. URL name should be unique and it will display a green tick if the name given is available, as below.
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.
11. Click on the newly created service and then click on ‘Dashboard’ tab.
12. Click ‘UPLOAD A NEW PRODUCTION DEPLOYMENT’ and provide deployment label
13. Browse for the package & configuration files from the location where we have created the package in step 5.
14. Check both the checkboxes and click the tick mark in bottom right.
15. It will start deploying the cloud service, the progress can be checked in the details section below.
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.
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.
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/