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

MVC Displaying posts tagged with MVC


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

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

Authorization Attributes - AuthorizeCore

Today I had an interesting issue with a custom authorization attribute, something I've written at least a dozen times in the last 6 months.  I typically lock down my MVC projects using a lot of the built in frameworks, but where I'm s...

Delay In Development

I had put a decent amount of time and effort into creating this website, but unfortunately it is still seriously lacking in the content department.  While I've been meaning to update it, I've been spending every free moment I have wor...

One Moment, Please