IIS 7 is annoying

For years now we’ve had computers running on IIS 6.  We know how to do things.  Set up of sites takes a few minutes of our time and we can do some fun stuff using IIS.  Now our new server runs on Windows 2008 server which includes the new and updated version of IIS.  To those that are new to the game, or really old school and do everything command line — fantastic — but for those of us who like our IIS manager, we’re playing a game of hide-and-seek just to get the most menial tasks accomplished.

This morning I was trying to set up an http to https redirect.  This is something we do quite often for our websites that require ssl connections so that your average user doesn’t come in via a non-secured link and expose data.  We could do it programmatically, but why bother when the requests hit IIS well before the programming and the entire site needs to be behind ssl anyway.  So we would normally just require ssl on the connection and set up a separate site with the proper host headers that then redirect to the ssl enabled site.  Fine and dandy, it works well on IIS 6.  Now my problem this morning was I did what I would normally do, set up both sites pointing to the html documents folder and on the sites that are doing the redirect, I clicked on the http redirect link and applied the redirect to the new destination.  I then tested my handy work.  Firefox then told me I was in a redirect loop.  What?!?!  So after Googling a bit, I found a few things, all of which referenced some web tags, one of which being <httpredirect enabled=’true’> which made me a little suspicious, I couldn’t find anything about this redirect like I thought IIS previously did.  Lo and behold, when I was clicking to apply the redirect, a little file was being created called web.config and inside that file contained the ever mysterious <httpredirect enabled> tag.  So what was happening was that since I was enabling on one site, I didn’t realize that it was writing a file which then by default enabled it on the other site since they were sharing the same directory.  Hence the loop.  So to solve, I had to create a new web folder to hold this “redirect site” so that the little web.config file had somewhere to hang out.

So, since now IIS 7 allows for the use of page-by-page redirects (now that can be a nifty feature, but I’m still a little disgruntled), this little web.config file can be set up to redirect anything anywhere in your site, as long as you have an application pool set up for each site.  So maybe someday I will understand why the entire GUI of IIS was rewritten, but until then I will still be annoyed that I have to change, and in the end, that’s what the gripe is all about — having to learn new stuff when there’s barely enough time to get client work done in a week.

Oh, and before I forget, our cat came back.  Luke and I were having a conversation while I was installing the new plantation shutters on Friday and he noticed a big furry creature running across the gutter outside.  I tried to convince him it was just a squirrel but he wanted to investigate further.  We went outside and saw nothing, which of course didn’t convince him.  As he started walking toward the back yard I yelled for him to ‘Wait! Look!’ and there was little Megan, all scared and poofy tailed.   After plying her with food and love and attempting to carry her back into the house twice (the first time yielded a nasty claw slice in my hand) we rescued her.  She spent quite a bit of time outside in the sub-freezing weather, we were all very surprised to find her alive.