Step-By-Step website in year 2015..

Amazon Free Tier is way too slow

The first discovery over last few weeks of trying Amazon Free Tier is that it is way too slow, when instance is a Windows OS. Well, what I could expect from virtual machine with just 630 MB of available RAM. It is a miracle that Windows 2012 server can possibly run on such low memory footprint at all. Everything I tried actually worked successfully, but the speed was just terrible. Eventually, my confidence with running EC2 grew, so I decided to buy a decent m2.small instance with 2 GB of RAM, prepaid for next 3 years and never use Free Tier again. After all, my hobby time on weekends is a quality time. I don't like situation, when some anonymous slow machine steals minutes of my personal time.

  • Choose available domain name
  • Purchase domain name on Yahoo Domains
  • Create private and public key pair on Amazon AWS
  • Use existing default security zone
  • Create first free m2.micro instance on Amazon AWS. It is Windows 2012 with nothing else
  • Test connectivity to remote desktop
  • Change instance timezone to your favorite one
  • Do not disable seemingly unnecessary Windows services, or else the RDP connectivity will be lost
  • Enable Web Server role
  • In Role Services enable Application Development, ASP.NET 4.5
  • Pin IIS Manager to task bar
  • Launch IIS Manager
  • Do not install Web Platform
  • Copy WDeploy to instance
  • Install WDeploy on instance
  • Restart IIS Manager
  • Drill into Management Service of web server
  • Enable Remote connections to port 8172
  • Start service in IIS Manager Action panel
  • Test the connection from local IIS Manager
  • To have the remote access in IIS Manager on Windows 8.1 add IIS Manager for Remote Administration software

Make domain alive and IIS manageable

  • In AWS Associate IP address to instance
  • Test the connection to empty IIS from local browser
  • Do not open port 80 to the world before you done with Umbraco install

At this moment, your IIS has several application pools running under some random identities and already contains default ASP.NET application and Deploy application. The best way to avoid problems with broken access to wwwroot subfolders is to delete unnecessary pools, applications and wwwroot folder content and recreate only necessary folders under predictable identity of single Application pool.

  • Delete all application pools, except .NET 4.5
  • Stop Web server
  • Delete all content inside wwwroot
  • Create new Default Web Site
  • When creating it, choose existing .NET 4.5 pool, physical path wwwroot
  • Uninstall Web Deploy 3.5
  • Make Web Service Management service automatic and running
  • Make Web Deployment Agent Service automatic and running
  • Install Web Deploy 3.5

At this state the IIS has a service listening on 8172 port with application named Web Deploy with correct local Windows account and less expected problems of accessing the wwwroot folder content. This application will be the front door for installation of Umbraco application. Using remote Web Deploy is better than manual manipulations with folders, files, zips, restarts and permissions.

Create website in Visual Studio

  • On local machine Install Microsoft Visual Studio 2013 Community edition
  • Start the community TFS account. You may trust TFS more than GitHub when dealing with Microsoft Solution structure
  • Create empty solution
  • Add Empty Web Application from available templates of older Visual Studio 2012
  • When Adding Web Application choose Target .NET Framework to be 4.5
  • Using Nuget add Umbraco to the application
  • Build it locally and depending on version of Umbraco manually add connection string
<add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|Umbraco.sdf" providerName="System.Data.SqlServerCe.4.0"/>
  • Rebuild the solution to see if there is no errors left
  • Save solution on TFS (do not add files which are not visible in Visual Studio Solution Explorer)
  • Validate connection to deploy from Visual Studio
      - Server: yourdomain.com
      - Web Site: Default Web Site - no slashes
      - Username: Administrator
      - Password: your password
      - Save Password: yes
      - Destination URL: nothing
      - test connection: success - It means that reinstall of Web Deploy application has used new Default Web Site with better identities. And the port 8172 has the Web Deploy .axd application alive
  • Deploy the application

Run Umbraco Install

Run W3C Validator for all pages

There are few small typos, fixed with help of validator.

Also some bug (?) in validator makes validation to fail on single element. 

.. 1 day later ..

Add www hostname to binding

One immediate thing I noticed, is that binding of Default Web Site to hostname.com only makes www link returning 404. This is caused by Yahoo Domains redirecting all *.hostname.com traffic to same IP.

 

After trying and failing to use various redirect tricks I gave up and decided simply to add one more binding to Default Web Site. It seems that well working redirecting is not trivial as it seems.

 

Perhaps later, I will add extra web site with simple default page redirecting all traffic to canonical hostname.