.NET 4.5

May 10, 2017

Adding WebApi & OAuth Authentication to an Existing Project

There are many tutorials out there that discuss the ease of setting up a new project, and checking all of the magic boxes to add Identity, WebApi controllers, and more. However while these may be helpful, in the real world situations are often not as simple. We might have existing projects that at the start didn’t need WebAPI - or maybe we used WebApi controllers in our code - but all in all, we didn’t get the proper security architecture in place.

In this post, we will walk through how to enhance an existing project to be able to create WebApi controllers and properly secure them using OAuth.

January 25, 2017

Using Entity Framework with Legacy Databases

I find more people are interested in getting started with Entity Framework within their organizations. However, the various documentation and examples that exist don't necessarily give the best overall implementation solutions. I have worked with many people that have thought "we have a legacy database setup, we can't use entity framework" or "we cannot use migrations, so we can't use code first." Both are very common misconceptions, but something that isn't the case. It just takes a bit of work. In this post, we will dive into the specifics of implementing Entity Framework to a legacy database, where we cannot rename tables and other objects without substantial effort. A link to full code will be provided at the bottom.

December 29, 2015

Debugging & Managing NuGet Packages A Lesson Learned

Over the past few years those of us in the .NET development space have been forced to jump on the NuGet bandwagon as it relates to adding certain dependencies to our own projects.  No matter what our individual thoughts are with regards to NuGet we must learn to live with the tool, and use it to the best of our abilities.  Most of the time the packages that we use will be well-formed and managed in a responsive manner.  However, as I recently learned, that isn't always the case.  When things start to go awry it can make your standard diagnostic processes less than successful.  Given these experiences I wanted to share two recent experiences with NuGet, not in an effort to shame any of the involved parties, but to help illustrate the importance of looking at solutions & packages in a different light than your standard development processes.

October 08, 2015

Handing Namespace and Class Changes in Entity Framework

Entity Framework is an amazing set of tooling that helps to manage data access in an efficient manner, however, it seems that when things start to go "funny" it can be a major time-suck.  A recent issue that I experienced that I thought would be worth sharing was an issue related to applying migrations.  Adding migrations is something that has become trivial, yet one day my project reported Unable to generate an explicit migration because the following explicit migrations are pending:.... With every single one of my existing migrations listed.  This was highly curious, as the application has been in use, in production, for the better part of a few months.

September 17, 2015

Don't Fear the Cache

Over the past three to four years I have spent extensive time working with customers to improve performance.  As part of this endeavor I have had the pleasure of working with numerous internal, external and third-party development teams for these companies and the experiences have provided a great deal of insight to how people look at performance with software development.  This experience transcends platforms as the specific concern with this post has been experienced with ASP.NET MVC Projects, DNN Projects, WPF projects, and even those on mobile devices.  Although each platform or process will have different rules and requirements for performance and methods to manage it, there are a few constants. This post is going to be the first of many posts around performance optimization and development. best practices. 

August 25, 2015

ASP.NET MVC 5 & Bootstrap 3 Validation Usage

There have been many posts out there that show various solutions to use ASP.NET MVC 5 with Bootstrap 3 style input validation.  Some of the solutions are far better than others, and others looked perfectly elegant, yet they didn't necessarily result in changes working the way that one would expect.   After trying multiple solutions I found that I was able to take one of the more elegant solutions and it was working for "success" but wasn't working for error states, so I decided to dive in an fix it for my situation.

December 15, 2014

Vendor API Integrations: Developer Beware

Since I started IowaComputerGurus in early 2006 I have worked on more than 100 different vendor API integrations.  Now two integrations have been the same, even if they are both going to the same vendor API.  Each integration project is a unique beast, the business requirements however similar are exactly that, similar.  The small changes, the small tweaks that you might have from one client to another on the same platform can be catastrophic.  Having done so many of these, I thought I had seen it all, from poor API's, to poor support, and everything in-between I could go on for days with the things I've experienced over the years.  However, after two recent experiences, by far the most horrible I've ever experienced I thought I'd share a few lessons learned to help others out there learn from my experience over the last 4-6 months.
November 03, 2014

Back to the Basics: LINQ and You

This past weekend I was a presenter at IowaCodeCamp, my favorite local .NET event each spring/fall.  My session this year was "Back to the Basics: LINQ and You" and it was much more popular than anticipated!  After spending a lot of time training development teams over the past year I found that although LINQ has been available since 2008 many individuals have either not yet had the chance to use it yet in their projects or those that are using it still didn't fully understand how/why it works the way that it does, and thus my session was born!
September 12, 2014

Load Testing Your Application: Art or Science?

Earlier this year I blogged about this importing of understanding and knowing how your application will perform under load.  (See it here).  After receiving a lot of questions from individuals wanting to learn more about "how" they can load test their applications and the tools that I use when testing applications I thought it would be good to follow up with a post to shed a bit of light on the process.  
May 30, 2014

Improving Web Application Performance - Part Three Client Side Considerations

In the first two parts of this blog series we introduced the importance of defining metrics prior to starting any performance optimization activities and the importance of identifying any user or role based issues.  In this part of the series we start to dive into the actual optimization part of the process.  I will start by introducing key concepts to look for, and then we will review the tools of the trade that can be used to help identify trouble points.  It is important to note that the information contained in this post is 100% applicable to ALL server side languages, regardless of .NET, PHP, Java, or anything else you might select to use.
May 29, 2014

Improving Web Application Performance - Part Two Users & Environment

Now that we have a set of metrics to use to validate the performance of our web application we can now start to dive deeply into resolving issues.  The first step in this journey is actually a step often overlooked by those that I encounter.  Professionally speaking 3 in 5 performance consultations that I am involved with are actually resolved by taking the points in this post into consideration.  So lets get started looking at users & environment.
May 27, 2014

Improving Web Application Performance - Part One Metrics!

For the last four or five years I have given a number of presentations on improving the performance of web applications, sometimes specifically focusing on DNN other times taking more broadly on ASP.NET.  However, the most popular of all presentations that I have given on Web Application performance was a session that took a broad look at application performance not only from a server side but also a client side application.  This talk was actually tailored to users that came from many application development backgrounds.  In this blog series I will share the information that was contained in that talk as well as a few more items of consideration that I have learned along the way.
March 24, 2014

A Practical Introduction to .NET Async

I have been speaking quite a bit recently at events about .NET Async and how to use this .NET 4.5 and later language feature in day-to-day code.  Due to popular request I have decided to make the most current version of my presentation materials available for prior attendees, or those curious for a quick example to quickly download.  

April 27, 2013

Code PaLOUsa 2013 Presentation Materials

This week I have been at Code PaLOUsa 2013, which has been a truly amazing event.  Over the course of the last two days I have given a total of three sessions on various current .NET development topics.  In this posting you will see all of my presentations materials, they are provided for reference only!  If you have any questions or comments please fee free to reach out in the comments below.

April 22, 2013

ASP.NET Web Forms Model Binding – My Favorite ASP.NET 4.5 Feature

I have been working on this blog posting for over 2-3 weeks, by far one of the longest writes of any posting that I’ve done in the past. The reason for this is that I’m writing about a concept that you should already be aware of which is the inclusion of Model Binding Support for Web Forms in ASP.NET 4.5. You can find a number of resources out there that talk about this, including this amazing tutorial series. So why do I feel the need to spend so much of my time writing about this feature? Well read on to find out!

February 26, 2013

Creating an ASP.NET 4.5 File Security Process

Often when working with web applications it is necessary to secure access to documents or other user supplied resources.  If you look online you will find a number of different recommendations on how to accomplish this.  Some will recommend a HTTP Handler, some will recommend a simple ASPX, others will have other random ideas.  Regardless of the actual implementation there is always a common area of mixed recommendation, once you have validated that the user has the proper permissions to access the resource, how do you get the item to the user?  In this post I'll discuss a new API that is publicly available in .NET 4.5 that helps with one problem area.
September 05, 2012

My Favorite Visual Studio 2012 Breaking Change

It is not very often that you see the words "favorite" and "breaking change" within the same sentence.  However, I will say with VS 2012 and .NET 4.5 there happens to be one that I thought I would call special attention to here on my blog as I've talked about the old behavior many times in talks throughout the past few years. 

June 23, 2012

Using radCaptcha Via DotNetNuke Wrappers

When putting a form that is public facing we often need to add a captcha to help prevent bots from submitting our forms.  Historically there has been a control available within DotNetNuke that worked for this, but admittedly it didn't have the best customization nor was it the most "pretty" of them out there.  Ever since DotNetNuke has had the Telerik Controls a new option has been available yet its usage isn't the most widely documented.  In this post I'll show you how to use RadCaptcha in your own custom modules.
June 21, 2012

jQuery and Clicking an ASP.NET Linkbutton

As a web developer one common request is to make sure that the interfaces we build out for users look the best that they can and also provide users with the best experience both via the keyboard and mouse.  As part of this we will often have areas of conflict.  This post is going to cover one common scenario that will impact users that might be using DotNetNuke common styles or working to create their own custom button styles.  With ASP.NET it is common for people to use "LinkButton" controls to trigger actions rather than your standard "Button" controls as they are easier to style.
February 29, 2012

Visual Studio 11 Caller Member Info Attributes

If you have been paying attention to what is going on in the Microsoft Community today you will notice is a big day.  Visual Studio 11 Beta as well as Windows 8 Consumer Preview were both released this morning, for those of us developers it means tons of new tools to try out and lots of new functionality that we can use in our applications as well as productivity and language improvements with.NET 4.5.  With this, I'm starting a new blog series highlighting some of the new items that I find helpful, cool, or otherwise interesting with VS 11 Development.  Today's installment talks about Caller Member Info Attributes.

Content provided in this blog is provided "AS-IS" and the information should be used at your own discretion.  The thoughts and opinions expressed are the personal thoughts of Mitchel Sellers and do not reflect the opinions of his employer.

Content Copyright

Content in this blog is copyright protected.  Re-publishing on other websites is allowed as long as proper credit and backlink to the article is provided.  Any other re-publishing or distribution of this content is prohibited without written permission from Mitchel Sellers.