Sunday, August 13, 2017

HTTPS everywhere

I am enforcing HTTPS everywhere on my new projects.

In order to do so, I redirect any attempt to access HTTP URLs to HTTPS. 

This was a bit of a struggle.

I tried the recommended approach:
        
          
          
            
            
            
          
          
        
This did not work, which was surprising. I ended up having to install an Azure Web App Extension:


















Now, I am forcing HTTPS everywhere, on all my resources.

Monday, August 7, 2017

WCAG 2.0 Compliance

So, a lot of the RFPs I've been bidding on are looking for WCAG 2.0 Compliance (accessibility for people with disabilities).

I figured the best thing to do is make my own site WCAG 2.0 Compliant.

I am striving for AA status on all 4 categories.

So far, here is what I am finding:


  • Color Contrast.  This is big.  Like no light yellow buttons with white text.  Okay, that's atrocious for fully-abled people, but still, I've had to make a lot of changes along those lines. The biggest net effect is my site looks cleaner, crisper, more defined.  There were some beautiful aquas that had to go, since neither black nor white text provided enough contrast.  I also made my help blocks solid, instead of a faded out ghostly grey.  All of these are overall site aesthetic improvements. 
  • alt attribute for img tags.  This is just good HTML practice.  I used to do that consistently as a high school kid building websites, I just got lazy.
  • aria-label attributes for input tags.  This is new to me, never heard of that attribute before today. Looks like it's an assistive technology thing.

Saturday, August 5, 2017

HTML5 Video hosted in Azure Storage

If you are like me and hosting Video files (MPEG / WEBM / OGG) in Azure Storage, you will probably need to do the following so that the MIME type comes down correctly:


        public static CloudBlockBlob UploadAndSaveBlob(CloudBlobContainer blobContainer, String text, String contentType, String extension)
        {
            string blobName = Guid.NewGuid().ToString() + extension;
            // Retrieve reference to a blob. 
            CloudBlockBlob blob = blobContainer.GetBlockBlobReference(blobName);
            // Create the blob by uploading a local file.
            blob.UploadText(text);
            // Set the Blob content type
            blob.Properties.ContentType = contentType;
            blob.SetProperties();

            logger.Info(String.Format("Uploaded text file to {0}", blob.Uri));

            return blob;
        }

and call the method, passing in a contentType of "video/mp4" for example.

This will set a ContentType Property on your Blob.

Also, you will probably need to install a WebM plugin for IE (which is oddly enough put out by Google, nice to see they're looking out for IE).

Friday, August 4, 2017

Back on RecruiterSight and new EDMX

I've been so busy writing RFPs for Municipal Agenda, that I haven't had any time to work on my Recruiter Sight project.

Finally settled on a 3rd Party Mail Sender: SendGrid.

Out of all the ones I tried:


  • SendGrid
  • MailGun
  • SparkPost
SendGrid is the only one that has consistently sent out my emails.  Which is an important feature of a 3rd party emailer.

Plus, Azure provides free sending of SendGrid Emails with your subscription. 

If Azure provided SMTP servers and a mail infrastructure, I totally would have just handled this in-house.  However, they outsourced this to SendGrid.

My new Recruiter Sight EDMX.  Still elegant, but growing: