Wednesday, February 27, 2008

IIS 7 FTP Availability

When I first installed Windows 2008, the first thing I did was install IIS, but I was stumped when I first launched it.  All of the FTP features I was hoping for (like a GUI to control AD isolation Mode) and integration with the IIS 7 manager were missing, and instead I had to result back to the II6 manager and FTP release.  As it turns out, IIS7 FTP is being delivered out-of-band (this is the topic of another discussion all together), and I was even more disappointed to hear that it wouldn't be available until the official Win2k8 launch!

Well now that it has officially launched, the IIS team has held up to their promise and IIS7 FTP (FTP7) is indeed available.



Wednesday, February 20, 2008

MS-DOS Editor still present in Vista

Don't ask why I was trying this, but I found it slightly odd that Microsoft was still shipping edit from the MS-DOS days - in fact, as you can see, the copyright is for 1995.  And yes, it is a 16-bit app being hosted by ntvdm.exe (Windows 16-bit virtual machine).  Weird!


Examining HTTP responses in kernel-mode cache

I came across an interesting post relating to a problem with a HttpModule caused by kernel-mode cache. The author points out a handy netsh command to view the contents of the kernel-mode cache.

You will need to have some requests before you will see anything - refreshing http://localhost/welcome.png a few times seems to do the trick.

netsh http show cache

Snapshot of HTTP response cache:

URL: http://localhost:80/welcome.png
    Status code: 200
    HTTP verb: GET
    Cache policy type: User invalidates
    Creation time: 2007.12.10:5.22.23:0
    Request queue name: DefaultAppPool
    Headers length: 186
    Content length: 184946
    Hit count: 15
    Force disconnect after serving: FALSE

Saturday, February 16, 2008

Vista SP1 Installation Results

I thought it might be worthwhile to keep track of my Vista SP1 installs and any particular issues I run into.

Updated: February 20th, 2008

First Install: Dell Precision 380, Vista x86

Installed without any problems, but about 18 hours later I was prompted to re-active Windows.  Reactivation was successful using online method.

Second Install: MacBook with Boot Camp 2.0, Vista x86

Installed without any problems but during installation the computer rebooted and booted OS X (default selection) - I suppose this is my fault and easily rectifiable, but something to watch out for

Third Install: Dell Latitude D620, Vista x86

I first tried to execute the service pack from a network share.  Windows prompted me to run the program, which I did, but after several minutes of waiting I checked Task Manager only to find it was not executing. For the next attempt I copied the file to a local drive and ran it - installation was successful.

4) Dell Optiplex 745

Installed without problems.

Checking the state of TCP Auto-tuning and Chimney (TOE)

I previous wrote about disabling TCP chimney and disabling auto-tuning - but what if you just want to see the status of these services?  In Widows 2008 and Windows Vista, netsh provides a status summary of these. You can view this information by running the following command:

netsh int tcp show global

This yields the following output:

Querying active state...

TCP Global Parameters
Receive-Side Scaling State          : enabled
Chimney Offload State               : disabled
Receive Window Auto-Tuning Level    : disabled
Add-On Congestion Control Provider  : none
ECN Capability                      : disabled
RFC 1323 Timestamps                 : disabled

The second and third line show the chimney status and receive window auto-tuning level respectively.  Auto-tuning is only available on Windows Server 2008 and Windows Vista whereas chimney is available as of Windows 2003 SP2 or SP1 with the SNP (Scalable Networking Pack) installed.

Tuesday, February 12, 2008

Catching JavaScript errors and masking over the alert() method

OK, I didn't think this would be such an amazing concept, but apparently someone did.  JavaScript actually allows you to override the default alert() behaviour; you can use this to display a fancy dialog in place of the standard modal alerts, or just alter the alert:

<script type="text/javascript">
// <![CDATA[
   var originalAlert = window.alert;

   window.alert = function(msg) {
      originalAlert('Altered Message: ' + msg);
// ]]>

Furthermore, you can apply the same principal to override the error behaviour:

window.onerror = function() {
   alert('An error occured');

The result of an error on the page is a popup "Altered Message: An error occurred".

You can test this out by adding another function and method

function throwError(e) {
    throw 'Exception';

<input type="button" value="Click Me" onclick="throwError();" />

Tuesday, February 05, 2008

It's the simple things that save you...

If you work on any type of web farm or cluster, they'll come a time when you have to figure out what web server you are actually hitting.  Sure you could enable tracing, but this comes with consequences (like an application restart).  Something I've gotten into the habit of on every site I work on is including the server name and last date/time refreshed in comments at the bottom of the page.

 <!-- Connected To: <%= HttpContext.Current.Server.MachineName.ToString().ToUpper() %> -->
<!-- Last Refreshed: <%= DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString() %> -->

Time after time again, I thank myself for doing this..