After my recent minor troubles with web hosting and domain name weirdness,I decided to look into possible ways to branch out, or improve the site. While discussing the issue, I was reminded of Azure.
Microsoft Azure is essentially Microsoft’s cloud computing service and platform. I must confess that I knew very little about it (not much more than I knew about most web technologies, to be honest) but as I had some Azure credit I decided I should at least make use of them to try to learn something. If there is one thing I haven’t been doing quite enough of lately, it’s branching out and learning new things. It’s one of those things that it seems like even with all the time in the world, keeping up with it will be a struggle. At any rate, I dove in.
Setup was surprisingly straightforward. I was quickly guided through a series of steps and able to setup a Windows Server VM. My understanding, so far, of the service is that you can create a VM which then runs endpoints, cloud services, and web apps. Depending on how you configure it and how many of these you setup (as well as your chosen specs for the VM itself) you will use differing amounts of credits. Effectively, how much traffic you get will be the main determining factor.
My first hurdle came with the Azure SDK. After a few failed attempts, I decided it might be time for a reboot- just to make sure that wasn’t related. What do you know- it worked, and I was able to install the SDK. With that installed, I opened Visual Studio 2013 and was able to create a new ASP.NET project. I chose a basic Razor sample web application.
After this was setup, I was able to publish the project directly to Azure via a publish option shown in the lower pane view. “So far Visual Studio and Azure had certainly worked for me” I thought, as I pointed my browser at the new website.
Server timeout, was the response to my optimism. After some head-scratching and googling the problem, I discovered I had missed an important step- I had not added a new “endpoint” to Azure. I needed to add an endpoint for Port 80, to allow HTTP traffic. After doing so, my example website worked like a charm. of course I still have no idea how it works, but now I’ve got a very reliable and easy-to-use platform on which to play with some of the web-based capabilities of .NET. This could mean great things- if I’m able to get a grasp on web applications in C#, it may be worth it to create a new Azure subscription for the purpose of a web application for managing BASeCamp Downloads. My current “technique” is over 5 years old now and it’s built using old, crusty PHP code I wrote while learning PHP, and I’ve actually forgotten how a lot of it works- so if I can create something via C# I may be able to make something that is more powerful and may allow for better integration into my existing applications. At the very least, it would be interesting since I could create a Service-type program which sits in the background and can address requests from various Updaters and interact directly, rather than via HTTP; or the data could be piped via XML in some fashion, etc. The usage of Azure opens up these possibilities and in ways that encourage experimentation.
I’d include a link to the Azure instance, but it really is effectively a fiddled-with version of the default template. I have a lot of learning (and catching up, arguably) to do to get up to date with many of the new design methodologies that are put into play. It is much different from the “seat of your pants” style that PHP seems to encourage. I think the trick is to think of something interesting and that I might find useful to create via an Azure instance, and then work towards that goal, learning as I go. It worked for BASeBlock, after all.