Quick Tip – Linking User Identity to oAuth Tokens in WebAPI

In my Zurb For Applications .Net Scaffolding, I setup a base .Net WebAPI project that uses oAuth tokens for a better form of authentication in a single page application model. Since the token provides any details about the user that you want to encode, here’s a quick trick to expose the User.Identity.Name and User.IsInRole methods to improve the authentication and authorization capabilities within your app. Continue reading


Sharing the Love – Zurb Foundation for Apps Scaffolding for .Net with Authentication


NuGet package here.

Github repository here.

A little while back I was really excited that Zurb released their Foundation for Applications (ZFA) library. I’ve been working with it a little and really like the results. I’ve learned some new things along the way and it’s helping be do a “platform shift” for my side project: Prayer Journal. I even created an initial scaffolding that others can use to start up their .Net apps. But I still needed to be able to let users create accounts and restrict access to pages, so a new scaffold was born, one with authentication.

Continue reading


Soup to Nuts – Using Zurb Foundation for Apps in .Net

Update: Scaffold now available on Github. NuGet package available here.

Update 2 Concerns over extending controllers are gone thanks to a note by Zurb, Link formatting is also updated to use the ui-sref model. I’ve updated things accordingly below, as well as the scaffold online.

I’ve been a big fan of Zurb and their frameworks for developing responsive layouts for a while now. I was especially excited when they announced and recently released their Foundation for Apps framework. This new framework is optimized for more speed and leverages the popular AngularJS framework to build apps with. While AngularJS is typically build on a MEAN stack, I wanted to leverage Foundation for Apps (ZFA) in a .Net environment while I rebuild a pet project of mine, and here’s how you can make it happen.

Continue reading

Matrix Code Tunnel

Refactored: Creating dynamic/configurable parameterized queries in Entity Framework

A little while back I posted about a technique I was using to setup parameterized queries using Entity Framework. I had posted to the .Net group on Google+ and received some amazing feed back from Dan Nemec and Chris McCall and refactored the code. It’s cleaner, easier to work with, and hopefully a bit more optimized too. Here’s what’s different. Continue reading

Computer Code

Creating dynamic/configurable parameterized queries in Entity Framework

EDIT: A better, refactored version of this can be found here.

Entity Framework is an amazing tool. It allows you to quickly and easily get your basic queries and updates running with little hassle. In addition, you have business objects to interact with, which makes your middle tier (or your controller) that much easier to work with. However, when you need to start setting up more dynamic queries from user input, things start to get tricky. Here’s a solution I created to help with that. Continue reading

How to run PHP applications in Visual Studio 2012

A PHP app launched from Visual Studio 2012

A PHP app launched from Visual Studio 2012

Note: This post comes as a HT to this StackOverflow question, I’m just tweaking a few things to accomodate for VSMMXII…

I’m working on a project to convert a PHP application to a .Net MVC application. The initial prototype has some nice bootstrap/highcharts functionality, so I want to preview the site locally as I’m migrating the code over. Instead of starting up or installing a new editor, I wanted to take advantage of IIS Express that comes with Visual Studio 2012 to run the app. It’s really easy to setup and here’s how to do it. Continue reading