Let's Talk Software

Rants about software to keep us sane

ASP.NET Identity 2.0 Security Stamp

Category: Custom Software Tag: Published 2014-07-09

I'm currently working through a complete Identity setup without using Entity framework. This is taking me to difficult places as the source for this library is yet to be released. It involves lots of reading and guessing. One area of confusion is the Security Stamp.

You can read about the description over at stack overflow http://stackoverflow.com/questions/19487322/what-is-asp-net-identitys-iusersecuritystampstoretuser-interface.

This is the best I found, but it still wasn't enough for the full blown, non EF version.

Read more

FireFox Settings

Category: Custom Software Tag: Published 2014-06-05

Because the Internet is still the wild west (as it should be), I run FireFox in a mode that I recommend. This can decrease page load times, reduce bandwidth usage and reduce the tracking that can be done (not prevent it). Click on through to see the screen shots…

Read more

SQL Tool Belt: Merge Statement

Category: Custom Software Tag: Published 2014-03-23

Database, Database, Database. They are everywhere, and have been for a long time. Personally I find working with a database enjoyable, especially when the requirements get twisted and you need to expand your mind to solve the problem. This blog post is not about one of those mind-bending situations. Just some basics that help with everyday SQL. This one is actually dated now, but still not used as much as it probably should be.

 MERGE

Starting back in SQL 2008 you could use the MERGE command to essentially combine your INSERT, UPDATE, DELETE logic into a single statement. This is nice if you still write your SQL code (which I do) and haven't moved to an ORM (note: I'm not a fan), but that is for another post another day.   Best way to learn is to see an example:

Read more

Simple Injector in ASP.NET MVC & WebAPI

Category: Custom Software Tag: Published 2014-02-16

TLDR: Simple Injector is good, use it.

As most developers do, we use IOC in our ASP.NET MVC sites, it cleans up the code and allows for better testing.  If you're not familiar with check out this article on Dependency Injection.

One of the longest running IOC libraries is Structure Map, which we originally choose because of it maturity and stability.  After running with this for 4 (ish) years (with complete success), I started to look into different possibilities for my Injector library.  Knowing that Structure Map has every feature you would ever want leads me to think there might be code that is affecting performance.  I only use IOC for a Service Layer & Repository Layer injection and its very simple at that, so I really don’t need all of the bells and whistles. I would rather have less features and better performance.

Dependency Injection in .NET has matured over the years and we now have options upon options.  After researching and reading many different perspectives and gauging community participation, Simple Injector was to be my next experiment.  The following is how I set it up in a new MVC project. (fyi this is all with Visual Studio 2013)

Read more