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……

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.

Azure Blob’s Ghost Folders?

This week I had to address a upload image to blob application that I had built in my development environment, was working fine, but needed to be configured to work in production.  For the application overall, I used Azure Samples for Upload Image to Storage (built in .NET Core).  In it, the configuration in appsettings.json looks like this:

"AzureStorageConfig": {
    "AccountName": "",
    "AccountKey": "",
    "ImageContainer": "images",
    "ThumbnailContainer": "thumbnails"


Account Name account name and AccountKey are easily found in Azure Portal, for container I used Azure Storage Explorer just so I could get a full look at the container and its blobs.  The problem was, in my development environment I was uploading DIRECTLY to container.  In the example above, I was uploading to the “images” container.  In my Production environment, though, my ImagesContainer had two folders:  images/small and images/large.  I tried to change the “ImagesContainer”:”images” to “ImagesContainer”:”images/small”, “ImagesContainer”:”images\small” and no go.  Requested URI not found.…

Step By Step: Accepting Checks via Telecheck, Payeezy & Direct API (.NET)

This is a very basic tutorial on dealing with Payeezy, who’s documentation I found sometimes difficult.  Some of this guidance, I only found in forum threads and so I document…

Get What You Need

  1. Merchant Demo account
  2. Developer Sandbox account
  3. Merchant Token (demo)
  4. API secret (sandbox)
  5. API key (sandbox

Using Async, Await, Plus a Slight Delay

Today’s problem dealt with how we view our invoices online.  We use an app on the iSeries that creates a PDF and delivers it to a set destination.  That destination, in our case is a regular windows server, the files landing in a small site:   pdf.mycompany.com.

My initial approach was simple, use the PHP API I have sitting on the iSeries to make a call to the program – passing it the parameters for that specific invoice, await response (which gave me the new created filename) and then redirect to that URL.  The method looks something like this:

public async Task<ActionResult> GetInvoiceAsync(int invoice)
    GetInvoice getInvoice = new GetInvoice();
    var client = new HttpClient();

    string fileName = await getInvoice.LoadPDF(invoice);

    string url = "http://pdf.mycompany.com/";
    url += fileName + ".pdf";

    return Redirect(url);


This worked great… 90% of the time, but the other 10% of the time, I clicked too quickly on an invoice and got forwarded to a 404.…

ASP.NET Core – Easy Transition of Bower to NPM

UPDATE (Oct 16, 2018):  I now rely on Libman for my front end management.  I use its 3 different providers to grab the libraries off of cdnjs, unpkg (supposed to include all npm) and filesystem for local files.  See post:  Using Libman Providers to Coral Front End Libraries

I love me some Bower, even with the shadow looming over it that it’s time is done.  Recently, though, it started to do something weird with just restoring/replacing packages that really began to cause problems with my project (and make for some seriously messy 99* commits).

I can do simple task running, etc but still very much a noob to packaging.

Here was my easy solution for removing Bower and switching over to NPM (and accessing those packages through Views).…