Posts Tagged ‘azure’

Windows Azure: How-To Enable FTP

October 4, 2011 Leave a comment

In this article, I will show you how to enable FTP on your Windows Azure instance.

By default, FTP feature will not be enabled when you spin up a new Azure instance. However, this does not mean that you cannot install FTP on the Azure instance. You can still install and enable FTP service manually.

There are 2 ways of installing this feature manually. First, enable Remote Desktop on your Azure instance and install it via Remote Desktop when the Azure instance is ready. The downside of using this method is that whatever changes you made using Remote Desktop will be lost once the Azure instance is being recycled. Therefore, don’t be surprised if you notice your FTP site went missing suddenly.

The second method is to write script to install this feature when the Azure instance is started. This will ensure that your FTP site will remain even when the Azure instance is being recycled. Steps below will guide you how to install FTP feature using script & code.

  1. Install FTP feature in IIS, and enable firewall rules for FTP on startup. Do this by creating a startup command that calls the PowerShell script below.

    Import-Module ServerManager
    Add-WindowsFeature Web-Ftp-Server

    # open up firewall port for port 21 (the default firewall rules only allow services spawned from svchost.exe to be allowed FTP access!)
    netsh advfirewall firewall delete rule name=FTP
    netsh advfirewall firewall add rule name="FTP" dir=in action=allow service=any profile=public localport=21 protocol=tcp

  2. Enable EndPoint on port 21 for your Azure Instance in the ServiceDefinition.csdef file.

        <InternalEndpoint name="FtpEndpoint" protocol="tcp" port="21" />

  3. Add reference of Microsoft.Web.Administration.dll into your solution.

  4. Add FTP site into IIS.

    ServerManager sm = new ServerManager();
    Site ftpsite = sm.Sites.Add("FtpSite", "ftp", ":21:", "C:\\ftproot\\");
    ftpsite.ServerAutoStart = true;

    ConfigurationElement ssl = ftpsite.GetChildElement("ftpServer").GetChildElement("security").GetChildElement("ssl");
    ssl.SetAttributeValue("controlChannelPolicy", "SslAllow");
    ssl.SetAttributeValue("dataChannelPolicy", "SslAllow");

    ConfigurationElement auth = ftpsite.GetChildElement("ftpServer").GetChildElement("security").GetChildElement("authentication").GetChildElement("basicAuthentication");
    auth.SetAttributeValue("enabled", true);


  5. Add user to FTP site.

    ServerManager sm = new ServerManager();
    Configuration config = sm.GetApplicationHostConfiguration();
    ConfigurationSection authSection = config.GetSection("system.ftpServer/security/authorization", "FtpSite");
    ConfigurationElementCollection authCollection = authSection.GetCollection();

    ConfigurationElement addElement = authCollection.CreateElement("add");
    addElement.SetAttributeValue("accessType", "Allow");
    addElement.SetAttributeValue("users", "myftpuser");
    addElement.SetAttributeValue("permissions", "Read, Write");


Finally, package and deploy your solution into Windows Azure and you have a FTP enabled site on the cloud.


  1. The files you send in will not be persisted. Those files may be deleted if the role is being recycled. So, it’s advised to store the files you need in some persisted location.
  2. FTP port may be different depending on which port you choose to use.
  3. If your FTP user is not the same as your Remote Desktop user, you may need to create the user first.

Windows Azure Platform Training Kit–September 2011 Release

September 24, 2011 Leave a comment

Yesterday Microsoft released the Window Azure Platform Training Kit – September 2011 Release.

The September 2011 release of the training kit includes the following updates:

  • [New Hands-On Lab] Service Bus Messaging
  • [Updated] Labs and Demos to leverage the new Window Azure SDK & Tools 1.5
  • [Updated] Labs and Demos to leverage the new Windows Azure AppFabric SDK 1.5
  • [Updated] Introduction to Windows Azure Marketplace for Data
  • Applied several minor fixes in content

The updates for the Windows Azure SDK & Tools 1.5 and the Windows Azure AppFabric SDK 1.5 are really quite significant. To give you an idea, here are some of the changes:

  • 25 of the 30 hands-on labs were updated to use the Windows Azure SDK 1.5 and/or Windows Azure AppFabric SDK 1.5.
  • 15 of the 25 demos were updated to use the Windows Azure SDK 1.5 and/or Windows Azure AppFabric SDK 1.5.
  • Approximately 145 projects updated.
  • 86 dependency checker files updated for 25 hands-on labs and 18 demos.
  • 22 hands-on labs and 7 demos updated for changes to the Windows Azure Portal experience.

Download Windows Azure Platform Training Kit (offline)

Windows Azure Platform Training Courses (online)

Windows Azure SDK 1.5 now available

September 15, 2011 Leave a comment

During yesterday’s Day two keynote at the BUILD, Microsoft announced the availability of the Windows Azure SDK 1.5 and Windows Azure Tools for Microsoft Visual Studio 2010. You can download the tools using the Web Platform Installer.  All three of these releases are aimed at simplifying development, deployment, and management on the Windows Azure platform.
The Windows Azure SDK includes the following new features:

  • Re-architected emulator enabling higher fidelity between local & cloud developments & deployments.
  • Many fundamental improvements (performance of emulator and deployment, assembly/package validation before deployment)
  • Support for uploading service certificates in csupload.exe and a new tool csencrypt.exe to help manage remote desktop encryption passwords.
  • Many enhancements and fixes to Windows Azure SDK 1.4.

Also available are several new enhancements in Windows Azure Tools for Visual Studio for developing & deploying cloud applications.  These enhancements include:

  • Add Windows Azure Deployment project from Web Application project.
  • Profile applications running in Windows Azure.
  • Create ASP.NET MVC3 Web Roles.
  • Manage multiple service configurations in one cloud project.
  • Improved validation of Windows Azure packages.

Download Windows Azure Tools for Visual Studio (with SDK)

See What’s New in Windows Azure

Categories: Windows Azure Tags: , ,

Widows Azure Accelerator for Web Roles v1.1 now available

August 17, 2011 Leave a comment

Nathan Totten just unveiled the release of an update to the Windows Azure Accelerator for Web Roles in his post, “Windows Azure Accelerator for Web Roles Version 1.1”. This accelerator enables you to deploy websites to Windows Azure web roles with multiple instances using web deploy in less than 30 seconds.

Some of its added new features includes:

  • MVC3 and PHP Support
  • Improved Logging
  • Start/Stop Synchronization Process
  • Test Site Binding
  • Windows Azure CDN Support

Download the Windows Azure Accelerator for Web Roles.

Categories: Windows Azure Tags: ,

Windows Azure: How-To Create a Certificate in pfx format

June 8, 2011 1 comment

In this article, I will show you how to create a certificate in pfx format. This certificate will be required to create a remote desktop login to your Windows Azure application web role instance.

If you want to create a Remote Desktop connection to your Windows Azure web role instance, view my previous post on How-To Create Remote Desktop to Windows Azure.

  1. From step 4 in my previous post on How-To Create Remote Desktop to Windows Azure., select Create from the drop down.
  2. Enter a name for this certificate. Then click OK.
  3. Now, click View on the newly created/selected certificate.
  4. Click on the Details tab, and click on Copy to file.
  5. The Certificate Export Wizard should pop-up. Click Next.
  6. Select Yes, export the private key and click Next.
  7. Select Personal Information Exchange – PKCS #12 (.PFX) option and click Next.
  8. Enter the password that you will use to login when you connect to the Remote Desktop. Then click Next.
  9. Click Browse and select where to save the PFX file and give the file a name. Then click Next.
  10. Review the settings and click Finish. Navigate to the folder that you selected for the cert to export to and you will find the PFX file there.

Windows Azure: How-To Create Remote Desktop to Windows Azure

June 8, 2011 1 comment

In this article, I will show you how to create a remote desktop connection to your Windows Azure application web role. I will assume that you have already created a Windows Azure project and a Web Application project in Visual Studio. If you have not do, please see my post here on How To Create Classic ASP Solution.

  1. Load your Windows Azure Project in Visual Studio
  2. On the Windows Azure project, Right-Click and select Publish
  3. On the pop-up wizard, click on Configure Remote Desktop Connections
  4. Select a certificate. Enter username, password, confirm password, and expiration date and click OK. Then click OK again on the Deploy Windows Azure Project wizard.
    If you do not have a certificate created, see How-To Create a Certificate in pfx format

Note: You should be able to see some changes made to the ServiceConfiguration.cscfg and ServiceDefinition.csdef files.





Windows Azure: How-To Add Instance in Management Portal

June 8, 2011 Leave a comment

In this article, I will show you how you can add/reduce instances for your Windows Azure application. You can also use the steps below to edit other configurations in your application. This is equivalent to editing the .csdef file in your source code solution from Visual Studio.

  1. Login to the Windows Azure Management Portal using your Live ID at
  2. Once you’re logged in, click on Hosted Services, Storage Accounts & CDN at the lower left of the page.
  3. Next, click on your application where its type is Deployment.
  4. At the ribbon on the centre top of your page, click on Configure.
  5. Click on Edit Current Configuration in the pop-up window.
  6. Now, look for the instance count tag that shows how many instance your application has and edit the number of instance count.
  7. Finally, click OK and wait for the application to be updated.

Note: If you have at least one instance running, there will be no downtime to your application. So  you don’t have to worry that there is downtime while the updating be being executed.