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.

Continue Reading

She’s Already Coding

IT? 21 .. Am I Ready for IT?
When I entered the world of web development, my company had only experienced one other woman who tried to enter IT before me. Without experience, she had mostly taken courses in Computer Science but had not handled many computers herself. The result was that she appeared “book taught”. When it came to real-life situations, she was completely unprepared. So, the company was a bit weary of trying women in IT.

My Sketchy Background
I, on the other hand, had lived in an illustrious neighborhood where people came at all hours of night to sell or trade you things. For a minimal amount! I had an endless supply of “broken” computers to build my experience on.

Don’t get me wrong, I went to a great college and pursued all I thought I wanted to do. I somehow snuck basic HTML, C++, Java classes in on the side for my “science” pre-requisites. I mean, SCIENCE!

When I went back to my small town, jobs were scarce and I just needed A JOB, any job. The last position I applied for, the future CEO recognized I had taken computer classes. He asked about those classes, specifically, and I gave a very non-chalant, “yeah I took a few computer classes…”. I didn’t care to mention the year I spent on the floor of the computer lab learning C++. Who wouldn’t do it? I mean.. SCIENCE!

I undersold myself. I got hired anyway.

Finding My Place
I spent a good three months as secretary. The most challenging part was dealing with other secretaries. I’d finish by 10am, answer the random calls, and for the most part of my day would count the amount of tiles I believed to be on the billboard in front of me and attempting to calculate its actual width with out Googling. Bosses caught on.

Well, that, and the net administrator caught me cobbling together a Depeche Mode website one afternoon. He asked if I wanted to stay after work the following week and help him change out some computers, etc. I agreed and one month later, I was in IT.

17 Years Later
I am the expert of .. adapting? When I joined the department HTML/CSS and a tiny bit of JS was the hot stuff. A couple of years into my career in IT, we had to make a decision: jump onto this new .NET stuff or go with PHP (which IBM was heavily supporting). We went with and stayed with PHP for years, upon years. Even worse, we had to stay on specific versions (max 5.3) to be cross compatible across systems. How I ever let myself become so stagnant bothers me and I vow to never let it happen again.

What Changed?
I let go of limits. What IF I didn’t have to use PHP, or never knew of it? What WOULD be the answer if I was a new developer today? API! The dead end was: our legacy system nor its developers were familiar with such things.

So, I coded it myself!
I used PHP to code my OWN API on the THEIR system and then jumped to my side, changed hats and thought: well, now I have my work cut out for me.

Now, I had set the gates free – I could use any language and environment.

My Decision
.Net Core. I loved the idea of .NET standard and how Xamarin (mobile) had all moved to being cross platformed. Visual Code had just launched (open source and cross platform) and it was exciting. It was all completely brand new, but unlike my old self – this time I jumped.

Now – cloudless Azure developer, VS, VSTS as my main tools.. I couldn’t be happier.

Those Moments They’ll Never Let Me Live Down

Not Big on Hardware

  • Lost focus and didn’t pay attention to the “notches.” WHY WON’T THIS RAM GO IN!!??
  • Ouch Ou AHHH!! The time I put a paperclip in my floppy drive to get a disk out and electrocuted myself.
  • Cut myself boxing devices for another branch with a warehouse tape dispenser and bled all over a box. Sent it anyway.

Maybe Not Cutout for Network Admin

  • Discovered how to progamatically send files over internal network and proceeded to test by sending a folder without checking out the contents. Brought the branch down.

Not a Quitter

  • Always the junior (2 above me had 10 and 20 years more than me), I was the eternal guinea pig, especially for the net admin. He decided one day to tell me over MSN (quiet dev office) that he was gonna take my computer over and then he proceeded to try and do so – just to see what I’d try. I tried basic port blocking, firewall, RDP, but it was a losing battle. In a quiet room with another developer, I dove under the desk and ripped out my cat5 and sat back down. What? No, everything’s fine.
Continue Reading

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:

[HttpGet]
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.

Continue Reading

.NET Core with PayTrace (Mime Type Fix)

This year I am re-writing my previous payment solution (from PHP to .NET) and first on the project list is credit cards.  We are using PayTrace and their client-side encryption as to not have to worry about PCI Compliance.

I’m to the point where I have a Pre-Payment model with all the fields needed to send via JSON.  I also have a method to request a token for sending (uses demo username and pass) and a test PEM file I downloaded from the PayTrace site.  I also got the webpage scanning credit cards, and I hit submit and.. I get this:

XML Parsing Error: no element found

This is appearing in the console of Inspector in Firefox.  Turns out this a generic error Firefox throws out when it’s expending a file but gets nothing.

My path’s are correct, but the “public_key.pem” file is not attaching to my post.   The problem?  MIME-type.

Continue Reading

Securing AS400 / iSeries (Comodo Free SSL)

Enabling SSL certificates with Comodo’s Free 90 Day trial SSL Certificate.  This process enables you to secure both web services, login, and SSL across all other servers/services on the AS400 / iSeries.

Note:  If you are replacing/renewing your cert and something goes wrong, do not be afraid to delete your certificate store (if this is your only cert) and start fresh with this tutorial.  I’ve done it twice, now, as the key in store had trouble matching the new cert, etc…  I deleted certificate store, followed my own tutorial and was up and going in minutes.

Continue Reading