Using Microsoft Flow to Sync BaseCamp & VSTS (To-Do to Tasks)

We’ve strugged for years to get various departments to adapt, and stick to, a project management system. In the past year, have finally had some success with BaseCamp, as it has proved to be user-friendly enough that more and more departments began to use it. We suddenly needed to adapt to our users. We needed to make Visual Studio Team Services work with BaseCamp.

Make BaseCamp To-Do a VSTS Task

Creating a solution for BaseCamp to VSTS actually proved to be easy enough. I setup a project in BaseCamp and then a “Main To-Do List”. The only challenge in this is I needed to pass the BaseCamp To-Do Id so that when I closed my VSTS task (work item), it could link back to BaseCamp. For this, I chose to put the dynamic info in the “tags” field of my VSTS flow. Here’s the setup:

Continue Reading

Print PDF’s on Azure Using an API and RazorLight

The Problem

I recently had an issue with printing a report to PDF using Microsoft Reporting Service and a RDLC file, etc. Something similar to this. Unfortunately, it worked great in development, but refused to work once deployed into Azure. No matter what I did, I could not duck the GDI errors I kept getting, and apparently this continues through a line of various PDF exporting extensions, all of which rely on GDI for export. Turns out, I’m not alone in facing this problem and so, I decided to find a solution.

The Solution

My general idea was to use something to render my PDF view, send that view as one long html string to a free PDF microservice and get the PDF in return.

Continue Reading

Let’s Build

New Environment, New Approach

It’s Day 1, my first Microsoft Build, and I was not prepared for the sheer numbers nor format. I tediously worked out this schedule with sessions and back up sessions (in case, I don’t know… tripped on the way to the first one?). I lost my OCD mind when I realized these sessions were held open format in the MIDDLE OF THE EXPO!

I quickly realized the “sessions” were to show off their specialty. To draw you in by topic, touch on some “new” topics you hadn’t heard of, and get you to come talk to them. The presentation was not so much a sales pitch as it was a “let me help you develop on our platform.” Interesting…

Continue Reading

My First Use of Vue + Bulma (Goodbye JQuery?)

The Hydra

I created a .Net Core site last month that despite meticulous detail to trying to keep my architecture tight, my database and API interaction and as clear as possible, I felt there was one large portion of my site needing attention: the front-end.

Being full stack often feels like wrestling a hydra. Just when I feel I’ve gotten the gnarly heads of database control, service interaction, dependencies under better control – there’s always at least one head loose, biting away at me. That currently, for me, is JQuery.

Your basic .NET Core application template contains the JQuery validation script, but it seems every feature I might want thereafter requires me to add a JQuery plugin. Animation? Add a plugin. Not to mention if I want responsive design, we’re looking at Bootstrap, which of course, requires JQuery. Javascript error? Good luck finding which plugin is at fault.

Done, so done with this. I need to improve my front-end game!

My Game Plan

Why Bulma

I’ve been hearing about this for awhile on dotnet hangouts and loved it’s easy to read naming conventions. It’s documentation is clean and it’s style resembled enough of Bootstrap for me to feel comfy and move forward. I also liked that it was pure CSS, NO JS!

Why VueJS

This just felt very light and clean. I skimmed through the guide and really enjoyed Matt Rothenberg’s “A Vue.js introduction for people who know just enough jQuery to get by”. Using that as tutorial as a reference, I dove into my first attempt at VueJS.

Guinea Pig

Requirements

  • a login form
  • if the user selects I am… “a dealer”, the account number field is required
  • if the user selects I am… “an employee”, account number field is disabled
  • password required
  • trim all text input fields

Code

Explanation

VueJS

First, I set the account field to :disabled=”isDisabled”, in my Vue, I set toggle to false (for initial load) and then in computed the isDisabled value by returning the value of toggle (false).

Then, I used v-on:change to call a method called “notNeeded” and pass it its own values. In my notNeeded method, I retrieve the value of that select, check for “E” (employee) and set toggle accordingly. Value runs through computed, setting “isDisabled” and enabling/disabling the account field.

I made some noobie errors, like I didn’t declare my variables in data (ex: selected: ”) and I added v-model to the div instead of actual input, but overall a good experience!

I finished off by adding a simple HTML required to my required fields and v-model.trim to get rid of trailing spaces on my text inputs.

Bulma

I actually just started with a section, using columns to divide my screen into 3’s and then use the middle column for my login “box”. I used the guide for the rest of the form setup and then finished off by encasing everything in a “hero” background (the first div) in a “is-light” color.

Continue Reading

PayTrace: 400 Bad Request For Declined Payment

TLDR:  post IS successful.  PayTrace, by design, returns a 400 error, which sets off exceptions in httpresponse.  Solution: catch the exception and then continue deserializing your response.

I coded a few weeks ago a .NET post to the PayTrace API which helps me demo and test payment by credit card using client side encryption.  The process more or less went like this:

  • Create demo account as a merchant on Paytrace
  • Download PEM key
  • On submit of form with credit card information, an imported PayTraceJS library encrypts the card number and csc code
  • Use the demo account’s username and password to submit a request for a token
  • Submit transaction (which includes encrypted info as well as other required fields) using token and await response

A successful http response returns a status code of 200.  I read it via stream, deserialize it using json into my CardResponse object (both successful and failure responses have the same design).  Everything went great until I began testing rejected cards.

Continue Reading