Setting up guidasaservice.com (pt 1).

By | 14 May, 2015

This article is the beginning of a series which is an attempt to describe how to setup a simple webapi service on the internet using Azure as the host.

We’ll do some normal hosting setup, grab an Azure App Service container , do some coding in Visual Studio and then upload to Azure and run it.

So whats first?

First we need a Domain Name. A Domain Name is the address that a user would put in a browser window to hit your site. It should be meaningful, relatively short and catchy (if you want people to remember it)

I’m going to setup a service that when you query it, will return something called a GUID. It’s a special kind of ID that when you’re writing programs and you need an internal reference which you need to guarantee is unique, you grab one of these in code.

There isn’t really many reasons why I could think of for requesting a GUID over the internet, but I wanted to test myself….

Domain Names come from registrars. The one I use is ukreg.com, they’re nice and cheap and the user interface is easy to understand.

So we’ve got our Domain Name, we’ll configure it later. What next?

Now for the Azure Hosting side of things. I’m going to use the preview side of Microsoft Azure rather than the classic portal (mainly because I can’t see at the moment how to add a D1 shared instance).

Sign up for account (there seems to be a 3-month free trial to start with). Once logged in and on the portal, click the +New button on the sidebar on the left

Screen Shot 2015-05-14 at 21.00.20

Click Web + Mobile

Screen Shot 2015-05-14 at 21.00.28

Click API App

Screen Shot 2015-05-14 at 21.00.45

** WARNING ** At this point if you’re not on a free trial, this could cost you money. Keep an eye out for monthly costs.

I’m selecting the D1 Shared Option so I can use certificates and my custom DNS name rather than an Azure generated one.

Screen Shot 2015-05-14 at 21.06.41

Click the Create button. Azure now creates your API App instance.

Screen Shot 2015-05-14 at 21.10.05

After some time, a new tile appears in the Azure Portal.

Click on the tile, and we can see the settings for the API App.

Click on the Azure Generated URL and you should see a standard REST response like this:

{
“status”: 403,
“source”: “https://api-app-0718bc8f0f3624fc69dbbbf1ce7f23661.azurewebsites.net/”,
“message”: “Permissions for service \”Techfrontier.GUIDaaS\” are set to internal but this request was external.”
}

So we’ve got some test data coming out of our API now, Next Article, how do we redirect our domain name to the Azure API Site we’ve just created.