2003 2008 2008 R2 iis SQL

Enabling ASP.NET Session State without Installing IIS

At a client site, I needed to enable within a web cluster the ASP.NET session state service (ASP.NET State Service) and initially this was going to go on one server within the web cluster. The only problem though, as this configuration is easy, was what happens if the one server in the cluster that this is running on is the server that fails!

The solution we decided was to place the service on the SQL Server back-end database. Though this is not clustered (as it is not mission critical), if the database is unavailable then so is the application so why not run the ASP.NET State Service on that machine.

So we changed the web.config file to read:


We went to the SQL Server (which was running Windows Server 2003 and so had the .NET Framework installed), but found that the service did not exist as ASP.NET was not installed.

So we ran the following, which claims to require IIS to be installed, but successfully enabled the ASP.NET State Service:

aspnet_regiis -i (this is in WINDOWS\Microsoft.NET\Framework\version folder

Set “HKEY_LOCAL_MACHINE\SYSTEM \ CurrentControlSet \ Services \ aspnet_state \ Parameters \ AllowRemoteConnection” to 1 on the server in the above step, set the service to Automatic and started it running.

And it all worked fine.


Hotfix Files

When an update to Windows is installed, if that update is a GDR (general distribution release) update, the possibility exists that a hotfix exists for the same files but in an earlier version. This hotfix would have been developed separatly within Microsoft for the specific customer problem that the hotfix fixes, but as it is not part of the service pack/security update cycle it does not have an obvious version number, and so could easily be installed out of sequence. Therefore the, the hotfix files for that GDR are copied to the %windir%\$hf_mig$ folder. This allows migration to the appropriate files if you later install a hotfix or service pack that includes earlier versions of these files. For example, consider the following scenario:

  1. You apply a security update that installs a GDR version of File.dll with a version number of 5.2.3790.1000 and copies a hotfix version of File.dll with a version number of 5.2.3790.1000 to the %windir%\$hf_mig$ folder.
  2. You apply a hotfix that includes a hotfix version of File.dll with a version number of 5.2.3790.0000.

For more click here.

2003 exchange

Exchange 2003 Resource Kit

The Exchange Server 2003 Resource Kit is almost ready for the shops. It should be available by the end of March 2005 and coming soon to the C7 Solutions web site is a book givaway. I have some copies to distribute as I am one of the authors of the book.


Enabling Remote Desktop Remotely

Run the following from a Windows XP or Windows Server 2003 PC:

WMIC /NODE:”client” /USER:”nwtraders\administrator” RDTOGGLE WHERE ServerName=”client” CALL SetAllowTSConnections 1

windows server xp

Two Logins To Install Software

With Windows XP you sometimes see that your Group Policy settings take two reboots or two logins to work. This is because Windows XP operates (by default) in a mode called Fast Logon Optimization. This means that the computer boots and logs in quicker, but it does mean that events that should occur during the computers boot or login will be delayed until the second boot or login.

Examples of events that this effects are software installations via Group Policy and folder redirection (i.e. home folders). During (or usually just after) the first boot/logon XP sets a flag and then during the second boot/logon Windows operates one time only without the Fast Logon enabled.

An example of the two events that appear in the event log (in chronological order) are:

Event Type: Warning
Event Source: Application Management
Event Category: None
Event ID: 108

Event Type: Warning
Event Source: Application Management
Event Category: None
Event ID: 101

This behaviour can be changed by turning the Fast Logon Optimization off. This can be switched on and off via Group Policy and the following setting:

Computer Configuration
Administrative Templates
Always wait for the network at computer startup and logon

More on Fast Logon Optimization can be found in article 305293 at Microsoft Support.


Outlook Profile Wizard

Fill in the information at the form here to create a valid profile for configuring Outlook 2003 to allow the client to connect to the Exchange Server without the need of a VPN from the internet (known as RPC over HTTP).

This will create a .PRF file that you can offer for download to users. Users will need to log-in twice for this to work though (or rather, be prompted twice for username and password, after which it will work)

terminal server Terminal Services

Setting Remote Desktop to an Alternate Port

The default port for Remote Desktop is 3389, but there are cases where it is useful to change this port, for example on the external interface of a firewall should you be providing remote support of said firewall. These steps are known to work on Windows XP and Windows Server 2003. They have not been tested by me on other versions of Windows.

On the Remote Desktop Server

    1. Start Registry Editor (Regedt32.exe).
  • Locate the following key in the registry:HKEY_LOCAL_MACHINE\ System\ CurrentControlSet\ Control\ TerminalServer\ WinStations\ RDP-Tcp\ PortNumber
  • On the Edit menu, click Modify, click Decimal, type the new port number, and
    then click OK.


  • Quit Registry Editor.



On the Client

    1. Click Start, click All Programs, point to Accessories,
      point to Communications, and then click Remote Desktop Connection.
  • In the Computer box, type the computer name or IP address of the
    computer to which you want to connect, followed by a colon (:) and the port
    number you want to use.For example, to connect to port 3390 on a computer named “MyXPPro,”
    type the following information: MyXPPro:3390

    To connect to port 3391 on a computer with IP address,
    type the following information:


More information at;en-us;306759


Enabling Remote Desktop During Installation

If you are installing a number of servers and you want to ensure that Remote

Desktop is enabled on each then add the following lines to the unattend file

that you are using to build the Windows servers (or XP client)




How to enable remote desktop remotely

Lots of sites on the internet discuss how to enable remote desktop in Windows XP and Windows 2003 Server, but the majority of them require you to have physical access to the computer first. So how do you enable remote desktop when you do not have physical access to the computer. It is all to do with the registry!

    1. Make a network connection to the remote computer to ensure that you have administrative access to the machine (i.e. \\computer\c$). This will prompt for a username and password of the administrator. Enter the correct details.
  • Start the registry editor regedit.exe (and not the older application regedt32.exe if it exists – it does not in later releases of Windows)


  • Choose File, Connect Network Registry


  • Enter the computer name as above.


  • Navigate to HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Terminal Server for the registry settings for the remote computer (take care not to select your own desktop)


  • Double-click fDenyTSConnections.


  • Change the value of this setting to 0 to enable Remote Desktop or 1 to disable it, and click OK.


  • If your remote computer has multiple network cards and you want to ensure that Remote Desktop is operating only on a selected card then navigate to the following registry location: (as above)\WinStations\ RDP-Tcp and note the LanAdapter value. If this is 0 Remote Desktop operates on all networks, and if this is another number then it operates only on the network as identified in the (as first)\lanatable registry key


  • Disconnect the remote computer from the registry editor using File, Disconnect Network Registry, and selecting the correct remote computer in the list.



Note: Subsequent to publishing this I have discovered a much quicker way using Windows management Instrumentation command line (WMIC). See here for more on this.