Friday, April 11, 2008

Getting Samba to work with Windows Vista

Vista defaults to only send the more secure NTLMv2 protocol, which Samba (and some NAS devices like the WL-700gE Router) do not support. This device is running Linux internally - great router btw ;)

To fix this click

  • Click Start/Run

  • Run secpol.msc

  • Go to Local Policies | Security Options | Network Security: LAN Manager authentication level

  • Change the settings from Send NTLMv2 response only to Send LM & NTLM - use NTLMv2 session security if negotiated

Good Luck ;)

Thursday, April 10, 2008

Moving the Temporary ASP.NET folder to another location

If you like me you like to move things around. Usually I believe I have a good reason though ;)

My good laptop has a nice, fast SSD (32 GB) inside it and a nice, big HDD (160 GB). The way flash drives like these work is that writing is usually slower than reading and according to the critics if you continuously write then its best not done on a flash drive. Therefore I decided my compiler should rather write to a standard HDD than the SSD. To make that happen I realized I needed to move my Temporary ASP.NET folder off the main disk where Windows is installed. Here is how that's done:

Find your machine.config file - usually under one of the .NET directories under C:\Windows\Microsoft.NET\

Open this file and add a <compilation> tag to it with an attribute called "tempDirectory" like so:

<compilation tempDirectory="d:\tempASP" />

Just ensure that you map the tempDirectory attribute to your own path.

Vista TCP Auto-Tuning

Vista introduces a new feature called “Receive Window Auto-Tuning”. What it does is to adjust the receive windows size continually based upon the changing network conditions.

Some people reported that auto-tuning cause network time-out problems with some applications and routers. You can turn it off if you have experienced such problems.

Open up a CMD window with Run as Administrator and enter the following command to disable auto-tuning

netsh interface tcp set global autotuninglevel=disabled

If you found that this doesn’t fix your problem, you can turn it back on.

Open up CMD window Run as Administrator and enter the following command to enable auto-tuning

netsh interface tcp set global autotuninglevel=normal

You can use this command to view the states of the TCP global paremeters.

netsh interface tcp show global

Installing Windows Vista from USB Flash Disk

When I got myself the Sony VAIO TZ90 with 32 GB of SSD I decided not to have a CD drive installed but to rather opt for an additional 160 GB HDD for all those data files that bundle up when you are developer. Unfortunately that meant I have to find workarounds when installing the OS from scratch and one of them was to install Vista from a USB Flash Disk which is also a lot faster than a CD would ever be.

After finding lots of conflicting information on how to really go about installing from USB here is the sweet and short of how its done:

1. Download and install the HP USB Disk Storage Format Tool (mouthful) and use it to format the USB Flash Disk using Fat32.

2. Insert your Vista CD into another Computer with CD ROM installed or use a Tool like Daemon Tools to attach the Vista ISO. Now do the following:

  • remember which drive your USB Stick is (for this example F:)
  • remember which drive your Vista CD is (for this example E:)
  • open a CMD window
  • change directory to the "boot" folder on your Vista CD
  • type bootsect /nt60 F: which will format the bootsector to be bootable for Vista
  • change directory to the root of your Vista CD
  • type xcopy E:\*.* /s/e/f/r/h/x F: which will copy the contents of your CD to your USB drive
  • close the CMD window
  • start the computer on which you want to install Vista
  • ensure the BIOS is set to boot from USB
  • boot and enjoy a blazing fast Vista installation