Software Engineer Problem Solver

Leo Reading

One Moment, Please...

Find My Articles

Share This Page

B l o g


Leo Reading

Software Engineer and Problem Solver From the USA

Download Resume

Programming Programming is not only my job, it's my passion. I use this to keep track of my professional growth, and also to share things I happen to find interesting.


Creating Static Error Pages Dynamically in MVC

Ben Foster has a great article on setting up custom error pages in an MVC project that I typically refer to each time I create a new one.  Recently, I've finally decided to work smarter, not harder, by setting up my own MVC seed project.  Of course, this should include some pre-defined error pages.  Unfortunately, error pages aren't exceedingly straight-forward.   Caveats There are two types of error pages that we need to consider: Errors handled by MVC, and errors handled by IIS This method will not correctly set the status codes (it will return 200 since you are being served a file) This solution hard-codes the URL.  That may or may not be acceptable for your application. Requires .NET 4.5.2+ Why Static HTML Files? In the event of an error in the MVC pipeline, IIS will not be able to serve an MVC page.  If this is the case, your application w...

Continue Reading

Working Smarter - Not Harder

I get very excited about my side-projects, and have a tendency to rush into them.  Unfortunately, I get distracted by something else that's shiney before I get them done, and I'm off to the next one.  There's a folder of all of the projects...

.Net 4.6 System.AppContext Whaaat?

I haven't posted an entry here in a while as I have a lot on my plate!  I started a new job and am truly enjoying it.  I work with a lot of very intelligent people, and am learning each and every day at a level that I haven't seen since I f...

Web API Bearer Token And Claims

I'm working on a project that has an MVC Web API that lives on a different server from an MVC5 application that needs to consume the API.  Because the user information is stored in the same database as the rest of the information that the API is...

Dynamic Robots.Txt Generator in MVC5 Application

A robots.txt file is important because it tells search engine crawlers what they should and should not crawl.  Unfortunately, they don't always listen, but we should take advantage of the ones that do!  In today's world, websites aren't sim...

One Moment, Please