Apr 15

Why I love .NET – Reason 314 – Config Files

While working the day job, I am porting over some sites from one virtual site to another.

Our clients will typically have their own external domain, which will get http redirected to a client specific sub-domain. Unfortunately, each external website has pretty much the exact same redirect page, under construction page, landing page, etc. The only difference is the redirect URL. Which, luckily in our case, can be found in the database (though, not really used).

During a deployment, we must manually turn each of the default pages to use the Under Construction page in IIS. This will prevent the redirect from occurring. However, you can see how the success of our company could lead to 4 hour long deployments, just in switching the default page.

“Why not script it?” you might be asking… That’s really the equivalent of saying “buy a nail gun if you’re nailing things” and not asking the question “is this implementation theĀ right implementation?” In this case, it’s not.

I wrote an app that will determine the exact same thing, and do it in a fraction of the footprint, and will let us grow with little production deployment pains.

Unfortunately, we will still need to implement the updates in the production environment to make this a reality. No small task if you’re looking at doing this through the IIS manager.

But, let’s not forget that this is a server application, and therefore, should have itself a command line interface. IT DOES! It’s called appcmd, and is found in theĀ %windows%\System32\inetsrv directory. But after doing some research, it looks like it may have some limitations when retrieving the data.

Fortunately, there is another way, and it’s found in the %windows%\System32\inetsrv\config\applicationHost.config file. I will be playing with this more in the next few hours, and so I hope to report some success.

Sep 02

Windows 7 Alt-Tab

I’ve been using Microsoft Windows since 3.11.

I didn’t get thoroughly familiar with keyboard shortcuts until Windows 98 and ME. My two favorites were Alt-Tab (switch) and Alt-F4 (close).

After getting a new laptop for my birthday, I shortly discovered that the Alt-Tab was a huge pain in my ass. And it was one I wasn’t willing to just get used to; I had no idea where I was at in any of the applications that would just flip in front of me.

A quick google search resulted in me finding my answer.

Control Panel
System
Advanced System Settings
Advanced (Tab) -> Performance (Section) -> Settings (Button)
Visual Effects (Tab)
Uncheck “Enable Aero Peek”
Apply/OK all the way out.

Problem solved, and blood pressure can resume normal 120/80.

Enjoy.

source