How to buy a certificate for an Azure Web App

If you have tried to enable SSL for your Azure Web App you know that the steps to do that are:

  1. Purchase certificate and export it into a PFX file
  2. Upload PFX file to a resource group that contains your web app
  3. Bind the web app’s hostnames to the certificate

Out of those steps the step #1 is the most non-obvious. Just by looking through the instructions in this article you can see that the process is complex and error prone.

Recently the Azure team has released an improved support for buying certificates for Azure Web Apps. Now it is possible to purchase a certificate without ever leaving the Azure Portal UI experience. In this blog post I’ll show how easy it is to buy a certificate and enable SSL for a Web App. As an example I will walk through the process of buying a certificate and enabling SSL for my web site http://ruslany.net/

Continue reading “How to buy a certificate for an Azure Web App”

Azure Web Sites – Continuous Deployment with Staged Publishing

In the beginning of the year Windows Azure Web Sites team has released a preview of the Staged Publishing functionality. The Staged Publishing allows you to create a staging site slot where you can publish a new version of the website and then test it before swapping to the production environment. This feature together with Continuous Deployment via GitHub, BitBucket or DropBox enables some very powerful deployment scenarios.

However the preview release did not provide the optimal experience for enabling Continuous Deployment (CD) for staging site. User had to configure a non-trivial workaround as described in blog post by Rick Rainey. Recently the Azure Web Sites team has released an update that fixes that problem and makes the setup of the CD with staged publishing very simple. This blog post describes how to enable CD from git repository located on BitBucket.

Continue reading “Azure Web Sites – Continuous Deployment with Staged Publishing”

Setup IIS on Server Core – Windows Server 2008 R2

This post has been updated from its original version to correct the installation instructions, which have changed since the time the post was written in Feb 2009.

With the addition of .NET Framework to Server Core in Windows Server 2008 R2 the Server Core installation option became even more appealing for those who want to use a very low footprint server for hosting their applications. Availability of .NET framework provides the following great benefits:

  1. ASP.NET support – you can now use Server Core to host your ASP.NET applications.
  2. IIS Remote Management – Server Core does not provide any user interface other than command line. But if you prefer to use IIS Manager UI to administer IIS, you can now use IIS Remote Manager to connect to IIS on Server Core and perform all the management tasks from within familiar UI of IIS Manager.
  3. PowerShell – Windows Server 2008 R2 includes IIS PowerShell snapin, which is also available on Server Core.

This post describes how to setup and configure IIS on Server Core in Windows Server 2008 R2. Specifically the following tasks are described:

  • Using oclist and ocsetup commands
  • Basic Installation of IIS
  • Installing ASP.NET
  • Installing PowerShell and IIS snap-in
  • Enabling IIS Remote Management
Continue reading “Setup IIS on Server Core – Windows Server 2008 R2”

ASP.NET postbacks and URL rewriting

ASP.NET Web Forms extensively use postback mechanism in order to maintain the state of the server-side controls on the web page. This makes it somewhat tricky to perform URL rewriting for ASP.NET pages. When a server side form control is added to the web page, ASP.NET will render the response with HTML <form> tag that contains an action attribute pointing back to the page where the form control is. This means that if URL rewriting was used for that page, the action attribute will point back to the rewritten URL, not to the URL that was requested from the browser. This will cause the browser to show rewritten URL any time a postback occurs.

Let me demonstrate this on an example. Assume you have a very simple web form in a file called default.aspx. When you request http://localhost/default.aspx in a browser and then view the HTML source for the response, you will see that the response contains the <form> element, which looks similar to this:

Continue reading “ASP.NET postbacks and URL rewriting”

Wildcard script mapping and IIS 7 integrated pipeline

The big benefit of IIS 7 integrated request processing pipeline is the fact that all the nice and useful ASP.NET features can be used for any type of content on your web site; not just for ASP.NET-specific content. For example, ASP.NET SQL-based membership can be used to protect static files and folders. Also, ASP.NET extensibility API’s, such as IHttpHandler and IHttpModule can be used to add custom modules and handlers that would be executed even for non-ASP.NET content.

IIS 6 did not have this level of integration. ASP.NET was plugged into IIS 6 as an ISAPI extension and by default was configured to handle ONLY requests mapped to that extension – for example any request that ended with “.aspx” would be be processed by ASP.NET extension. This obviously was a big limitation for customers who wanted to be able to use ASP.NET features for all other contend on web site. The most common way to workaround that was to use “Wildcard script mapping”. This post explains how an application that used wildcard script mapping in IIS 6 can be migrated over to IIS 7.

Assume you had configured ASP.NET in IIS 6 to handle all requests by using wildcard script mapping. For example you had an ASP.NET module for URL rewriting and you wanted this module to handle extension-less URLs.

Continue reading “Wildcard script mapping and IIS 7 integrated pipeline”

Introduction

My name is Ruslan Yakushev. I am a program manager on IIS team, working on some of the very interesting projects that are being developed in the team right now. I have joined the team about a year ago, and was thinking about starting a blog for a while now. The primary work responsibilities kept me busy, so I have been postponing blog idea for a while. Every time I needed to make an announcement or an update on IIS community site, I asked some of my colleagues  on the team to blog my content. Finally, I figured that I should probably start my own blog, so I could have all the freedom of publishing my own content any time I want.

Being a technical program manager on the team, I like to use (in other words – “dogfood”) the products that team develops. Hence I decided to self-host my own blog by using latest version of IIS. Also, I have been working with FastCGI and PHP for a while now, and became quite familiar with many popular PHP applications. As a result I chose to run my blog by using latest version of WordPress, which is a very nice and easy to use blog engine application. Finally, I am using my favorite feature of IIS 7.0 – URL rewriter – to enable “pretty permalinks” on my blog.

I plan to use this blog to publish information related to FastCGI, PHP, URL rewriter and IIS in general. I hope you’ll find this content useful.