Change Login Using Windows Authentication

Recently I had a need to allow users to change their login on an MVC site that used Windows authentication.  Of course we did not want the user to log out of their machine to do it.  The trick of course involved sending a 401 response, but how to do that and not get stuck in an endless loop.

The 401 Loop

It seemed simple enough, in fact too simple.  You just return a 401 challenge and have them move on to their previous page.  The 401 response is what presents the user with the Windows login popup.  In reality the 401 response acts like a redirect on itself, so you get two page loads and it forgets any variables you set.

Well that simply would not do. Read the rest of this entry

Getting Started With Angular 2 In Visual Studio 2015

Angular 2 And Visual Studio 2015?

VSTSNG2PaintI want to start learning Angular 2!  We have an enterprise project that will be developed in Angular 2.  In fact the contracting firm will create a minimum viable product and then it will be up to us to do the rest.  So I really must learn Angular 2.  We also use Visual Studio 2015 Enterprise edition.  Most of our current projects target .NET 4.

If you have looked into Angular 2 just a bit you will find a huge difference.  Most people are teaching it using Code or some other IDE that is not Visual Studio.  So my goal in this post is to take the 5 Min Quickstart from Angular 2 and make it run in Visual Studio 2015.

I will not go into detail on every bit, please see the Quickstart for that information.  I am just focusing on getting it running in Visual Studio 2015.

Read the rest of this entry

Easter Eggs in the Enterprise

Plastic Easter Eggs

Something I always enjoyed when I was younger was finding Easter Eggs.  I also remember the first time I found Easter Eggs in software.

I was really excited and thought I had found something unique.  Most of the time though it seems these fun little things are only in games.  Personally I would like to change that, or maybe just have it happen more often.

Read the rest of this entry

Becoming A Social Developer

Social What?

What?!

What?!  I know that sounds crazy.  Think about it though, the movie stereotype of the lone developer who works in a Faraday cage is nowhere near realistic.

We are human being after all, and humans need some level of social interaction.  Trust me, it is a good thing.

Jeremy Clark did a presentation at the Visual Studio Live conference I attended December of 2015.  I thought it was a neat concept, and it clicked with me.  I was at a conference, but if I was not with my coworkers I really was not talking to anyone.  I decided to take up the challenge.

I was not alone in this decision.  There were a few other developers who were going out of their way to talk to other people.  It was nice, it made the conference seem more like a community.

Read the rest of this entry

Testing Gist in WordPress

WordPress Gist Support

Apparently WordPress supports using Gists to share code.  I plan to test that with this blog post.  I created a JavaScript Gist with two simple functions.  I will try to share each file on its own.

Read the rest of this entry

Application Event Logging

The Art of Logging

Log Book

During my time as a Naval Nuclear Field Machinist Mate I did a lot of logging.  The data points we logged were not for busy work, they had a reason and a purpose.

Logging certain data points around the same time multiple times a day is a lot of data.  As you know this data lets you see trends, maybe detect a potential equipment failure before it happens.

Application logging in the enterprise is not much different.  The hard part is knowing what to log, where to log, and how to log it.  I hope this article will help you answer some of those questions.

 

 

Read the rest of this entry

Visual Studio Live 360 December 2015

vslivelogoI really must apologize for waiting so long to post about this conference.  It just kept slipping my mind.  My team and I attended one in Orlando last year (2015).  If you have never been to a large developer conference you are really missing out on some goodness.

This conference was my first real one I have attended.  I thoroughly enjoyed it, and would love to attend it again.  This year though, I am shooting for Microsoft Ignite.

Read the rest of this entry

The Magic of Config Transformations

Fog, trees, and a lightWe have all used the magic of the Web.config transformations.  This is when we have our Web.config and connected to that is a version that does some work for release and one for debug; Web.Release.config and Web.Debug.config.  These are a great way to automatically have the correct target use the correct settings, especially connection strings.  Whether we use that or not and just leave it as something that looks cool is a different thing.

Did you know you can get this magic for your console applications as well?  I know, a web developer doing console apps?  As an enterprise one sometimes I find it is the best solution to some problems.  While it seems like a small thing I wished I had it in the console applications, I am happy to say that I have found it!

Read the rest of this entry

Beware of Tunnel Vision

The Road to Nowhere

The Road to Nowhere

Recently I was working on an older project.  Nothing too big, just a really old Windows Service that consumed another third party SOAP web service.  I finally had the chance to do something we don’t get to do in the enterprise, improve old code without a user request due something broken or needing a new feature.  Yes for those that don’t know, if it isn’t broke you don’t fix it.

Working on this project I had become fixated on implementing something in a way that just could not be done.  Because I was so focused on the one path I could not see what was plain and simple in front of my face.  Little did I know I was on the Road to Nowhere.

Read the rest of this entry

Interested in Blogging?

If you are interested in blogging I highly recommend the free email course by John Sonmez; Create a Blog to Boost Your Career.  If you don’t know about John you really should take some time.  John is the founder of Simple Programmer, which is a great resource on its own.

I initially started this blog as something to keep track of things for myself.  Which really was kind of a bad idea as it has become more of a mess than something useful.  I came across John’s course and thought “Hey, its free.  What can it hurt?”.

I have not finished the course, but it is great so far.  In fact it is because of this course I have decided to change up my blog.  Instead of just being my space for information I am going to focus on things I do every day.  Of course I will deviate a little, but most of it will be related things I do at my current job.  I know there are a lot of other resource out there for web development and such, I just don’t think most of them take into account us enterprise types.  Believe it or not working in an enterprise environment is very different than the courses, books, and tutorials we encounter while learning.

Back to John’s course though.  Even if you are not interested in a technical blog, I feel this course applies to any type of blog.  If, and you should, take the course stick to it.  Take it seriously as if you were paying to attend a class.  He gives homework in each lesson, and will reply to you.  I really wish I had taken his course before I started my own blog.

Follow

Get every new post delivered to your Inbox.

Join 366 other followers