When using remote access you may find that uploading or downloading a large file or a group of files will cause the connection to time out before the operation finishes with the error message "The remote connection to the computer timed out. Please connect again."

By default, remote access is configured to timeout after 20 minutes, which is adequate for uploading/downloading about 15 MB even at slow DSL speeds but if you are frequently seeing this error message, you’ll need to adjust the timeout value to something higher. Setting the timeout to 30 up to 60 minutes is reasonable if circumstances require it. Setting a timeout interval that’s too long increase your security risk and can consume an unreasonable amount of resources on a server.

It is easy to change this timeout value:

  1. Using mstsc.exe, start a Remote Desktop Connection session to your home server.
  2. Use notepad.exe, to edit C:\Inetpub\remote\web.config.
  3. Locate the following line:
    <sessionState mode="InProc" cookieless="false" timeout="20″/>
  4. Replace "20″ (which represents 20 minutes) with a larger number to allow your uploads to finish.
    If you change the timeout value to more than 200 minutes, you must also change the executionTimeoutvalue. Search for the following line
    <httpRuntime maxRequestLength="2097151″ executionTimeout="12000″/>
    and increase the executionTimeout value (measured in seconds) to the same or greater value than the timeout value (measured in minutes).
  5. Save your change, close the file, restart the IIS after this edit or better still, restart the server. Any edit to IIS or a related issue with the web configuration will need the web services to be restarted and log off from your Remote Desktop Connection session.
  6. Use Remote Access to upload your file or files to ensure that the timeout parameter you chose is sufficient to complete the upload.