Deploying Old MVC3 WebApps to Old 2008R2 WebServers

by fwhagen Wed, 04 October 2017

I just spent way too much time moving an Intranet webapp from one server to another for a client.  The publish was easy enough, and everything worked on the server, but I could not access it from a remote workstation.  It uses Windows Authentication for security and customized views, but I kept getting the annoying "401.1 - Unauthorized: Access is denied due to invalid credentials" error from IIS.  I tried a bunch of things, many very weird from the Internet.  Then happened on the following post from StackExchange:

How can I check if my IIS site is using NTLM or Kerberos?

 

I simply flipped NTLM to the top of the Providers list, and it worked perfectly.  (Ger there by dbl-clicking the Authentication icon in IIS Manager for the site.)

I should probably do that for the Default Web Site (top) layer for all my servers.  Make my life easier, until I forget again.  I should probably post that.....

 

Keywords:

Filed Under: .NET | System | Work

Use Multiple Versions of Visual Studio and Want Pinned Solutions?

by fwhagen Fri, 13 January 2012

I need to have VS2005 and VS2008 installed for support of one of my clients, and of course I use VS2010 for my own development.  And I love the pinned list of solutions that VS10 offers.   In the past, I used a folder Toolbar in the Taskbar for listing solutions for easy access, but that was a maintenance task. 

TaskbarPinIn Windows 7, you can pin the Visual Studio Version Selector to the taskbar and pin items from Recent to Pinned (or do it manually as any other Win 7 file can be).  This has enhanced my productivity for the client without cluttering my taskbar or desktop at all.  Windows 7 continues to be the most useful environment I’ve ever use. 

Keywords:

Filed Under: Programming | System | Work

Easy Image Tools (and FREE too!)

by fwhagen Thu, 08 May 2008

It amazes me in my travels how many people feel the NEED Photoshop for web development.  And, of course, they only use about 1% of its total capability.  It is true that years ago, it was the only game in town for Image creation and manipulation.  But not for a while now.  There are many free alternatives that suit the web developer much better.

Paint.NET My favorite for most tasks is Paint.NET.  It greatest feature is its price:  absolutely free!  It started life as a college project and was so successful, that it lives on as a great piece of Freeware development.  It is not Open Source, however.  Some of the other features include layering, filters, great image processing tools, alpha transparency, PNG, and many, many more.  All put together in a small, efficient package that is both easy to use and very powerful.  And hundreds of dollars less than Photoshop and lacking the disturbing Adobe trend toward spyware.  And as the name suggests, it is built on C#.NET, so I feel like I am supporting the community I am a part of.

GIMP If you need more, there is the GIMP project.  Much more complicated, far more powerful, still free, but not nearly as user friendly.  It resembles Photoshop in many ways, including the powerful plug-in model that PS uses.  I use GIMP 2.2 for things I cannot do in Paint.NET, which really isn't very often. 

You know, between the two, I don't at all miss the copy of PS I had at my last job.  Not at all.  Of course, I am not a graphic designer or a heavy Photographer either that needs the power of PS, but I haven't worked with many people who really were either.

One last note.  For those that have been heard to say, "[MS] Paint is good enough.":  Do yourself a favor and get Paint.NET.  MSPaint hasn't been good enough since the '90s.

Keywords: , ,

Filed Under: .NET | Programming | Work

Developer Chic

by fwhagen Fri, 20 July 2007

A colleague and I were discussing desktop systems, and agreed in confusion about the seemingly typical cost-cutting measure of giving developers underpowered systems to work on.  This got me thinking:

First of all, with todays prices, how expensive would it be to really outfit a developer with a truely powerful rig?  You don't need tons of storage or a fancy 3D gaming card or high-end sound (unless, of course, that is your line of business) so you should be able to get a really powerful machine for under $2000.  It shouldn't be hard to do an ROI for that, just in productivity gains.

Second, it would make your true developers, the propeller-heads that love this stuff, very happy.  That is also a great productivity gain.  After all, a happy coder is a working coder, not one that is standing around bitching.

Finally, I always felt it a truism that it is worse to have a better system at home for development than at work.  This is more an intangible.  After all, you can't constantly be polling people about their personal systems; not to mention, most of us have more than one.  I have 4 functioning and a few not.  I personally will feel more compelled to work on the better system; for management's sake it ought to be on my desk at work.  

So, you management types:  we developers love the hardware, we want to play with it, we want to use it, we want to possess it.  It's a cheap win to give us toys to play with.  We will want to exercise them.  It's in your best interest.

Keywords: ,

Filed Under: Programming | Work

Interviewing Programmers

by fwhagen Fri, 01 June 2007

I have hired a few people in my time.  Not many, and I'm not an expert, but I have learned a few things.  In my experience, the best programmers exhibit obvious enthusiasm in 3 specific areas. 

The first is their hardware.  Truly great programmers take great pride in their setup, although not in the same ways.  If you can get the gleam in the eye when off-handedly talking about the latest CPU, the home network, or custom case, or skinned interface, you have found proof that they really are into what they do.  For me, it's my computer.  I have never bought a computer.  My dad purchased my first PC in 1991, and I have upgraded it ever since.  My x386 is now a P4 and soon to be a Core2Duo.  Of course, I love my home network I've been fiddling with since 1998 and I can't use a stock XP installation for more than a few minutes before I have it all modified up.

The second area I borrow from Jeff Atwood of Coding Horror.  Yes, again.  The interviewee should have a favorite piece of code that they have created.  Not usually an entire application, but a class, algorithm or routine that they are especially pleased with.  Don't blame them if they can't put their finger on a single one, I have a hard time there too.  Either my frequent implementations of Linked Lists, the automated Secure File transfer / Content Management solution, auto-validation in C# from custom attribute assignment, or my comic strip collector... It's especially important to me that they have some personal code they love too, not just professional.

The last area I think is important is probably the most controversial:  gaming.  Find out what kind of games they play, it may say a great deal about the kind of coder they are.  FPS gamers tend to be very direct, task oriented, focused coders.  RTS guys are more big picture, and turn-based strategy players even more so and very methodical.  If you find a Civ Addict, hire him now!  MMO gamers are probably good at maintenance or grind programming.  And the ones that love them all will not be exceptional in any one area, but will be very versatile.  That's where I lean, though I LOVE Civ; so much so that I can't leave it on my PC for long before it becomes a problem.

These generalizations are just that.  Not to be taken too seriously, but they have never let me down.  I have found that I cannot even consider someone who doesn't exibit much in any of the categories, or prefers XBox gaming, or doesn't own a PC (!). 

There are always exception, these are just my observations.

Keywords: ,

Filed Under: Programming | Work

Lazy Coding or Careful Coding?

by fwhagen Fri, 09 March 2007

Some background:  A few months ago, I decided to put a little AJAX in an app I inherited.  The problem was a huge form that used post-back to fill some dropdown boxes based on values in other elements.  I coded the AJAX all from scratch, or near scratch anyway, mainly because ATLAS was still in early beta and this is a 1.1 app.  Anyway, everything worked well enough, or so I thought. 

This is where good end-user testing is so important.  You see, since I inherited this beast, I don't know how everything is supposed to work.  Some of the nuances are not always apparent to me and I might miss them.  For example, when creating a new form, a set a parameters will autofill the main form.  When I inserted my AJAX streamlining and tested, everything worked great from my perspective, a new form was created with some of the values prepopulated.   What I didn't realize was that the dropdown list was not being read correctly by the codebehind, because from it's perspective, it was empty the last time it saw it and was not reading the form post value.  I don't know yet whether this is my fault or the friendly designer who wrote this screaming... thing, but the end result is that not all of the values were filled that were supposed to.

So here's where my post title comes in:  When I put the AJAX calls in, I did not change the code-behind.  I simply added my JavaScript and disabled the elements' autopostback attributes.  When developing systems I don't understand, I make as little impact as possible and comment like hell, so someone can come in behind me and fix what I broke.  I also CYA in comments for who requested what changes and why.  Fixing broken code reminds me constantly about the importance of good commenting, despite that I don't do very good job of that in my original code.  Anyway, the implementation of some business logic features and these got rolled up, tested of course, and deployed late yesterday.

Well, this morning I get a frantic call and a HD Ticket:  Yep, the form is not populating all of the values.  It needs to be fixed immediately!  And behold!  It only took 15 minutes to find the cause and simply turn on the autopostback and disable the JavaScript.  All in the aspx file!  If I had removed or commented the methods in the code-behind, I would have had to recompile everything and risk version conflict; I had started on the next set of changes, of course.

So there's a lesson here, I think.  Although it is not the most efficient coding technique in the world, there is ample reason to not remove a method that you think is unused, especially if you do not understand the total impact of a change.  Let it sit there, all it is hurting is a tiny amount of overhead and some compile time.  This time it really saved my bacon!  Next time it will probably bite me.

Disagree?  Send me your exeriences in comments!

Keywords: , , ,

Filed Under: .NET | AJAX | Programming | Work

C#.NET Inheritance

by fwhagen Fri, 01 December 2006

Inheritance is a good thing.  It offers a great way to simplify coding through rollup of repetitive tasks and common attributes.  It is one reason why OOP is superior to most other programming methods.  It's a beautiful thing.

It also offers great job security.  Nothing endears your successor more than trying to figure out properties that are inherited 5 levels up in the abstraction with NO commenting or clue where to look.  And don't even get me started on N-Tier programming when N > 5!  Solutions get a bit unwieldy with 8+ projects attached.

Keywords: , ,

Filed Under: .NET | Programming | Work

The White Light

by fwhagen Fri, 01 December 2006

This morning, a coworker told our BA that she needed to help the user to see the light.  From the look on her face, I think she'd prefer to help the user move toward the light.

Keywords:

Filed Under: Work

Network Time Syncronization

by fwhagen Tue, 17 October 2006

When working in a network environment, and who isn't anymore, it is essential that all systems be syncronized.  The easiest way to do it, if NTP is disabled, is to use Active Directory or simple Domain functions.  On any Windows machine schedule the command below at least once per day:

net time /Set /y

Keywords:

Filed Under: Work

The Irony of the Last Week

by fwhagen Wed, 27 September 2006

Well, last week was the last week at my old job.  The ironies lined up, the Traffic Gods spoke and "I believe"; that I made the right choice, that is.

Tuesday, on my way to work, a semi I was following kicked up a large piece of plywood which slammed into the nose of my Thunderbird.  $600+ in damages, and an insurance claim.  Additionally, I was nearly 3 hours late.

Wednesday, traffic on the way home was so bad, it took well over an hour to get home.  I was late getting home so Ang could go to work.  No reasons I could see, just normal VB stupid people.

Friday, my last day, on my way in, there was an accident in the Downtown Tunnel.  I sat in traffic for a half hour not moving at all.  I was almost late getting to my exit interview, which I found extremely amusing.

I will be very glad to not have to deal with rush hour traffic at the downtown tunnel again.  This afternoon I also realized that before I drove East in the morning and West in the evening, enjoying Sol each time, and the blindness that goes with it.  Now I am driving West/East.  Ahhh.

Finally, I finished the audiobook series of Isaac Asimov's Foundation series.  All 7 books.  I will be posting the review shortly.  Just seems fitting to end an era with the conclusion of an epic.

Keywords: ,

Filed Under: Life | Work

TextBox

RecentPosts