Mapped Network Drive Disconnects From Server

Mapped Network Drive Disconnects From Server


( Share the Noogies )

I’ve seen quite a few queries on this site for information about network drive mappings timing out and disconnecting. This is usually caused by settings on the server and is common on Windows 2000 and Windows 2003 servers. Microsoft sets the default timeout on network connections to disconnect after 15 minutes to preserve system resources. You can change this setting in the servers registry with regedit or at the command line. From the command line you can even disable it which adds a few more reg keys. You can’t disable it from a registry editor unless you add the keys that are missing.
I prefer the command line method to completely disabling the auto disconnect of the mapped drives. This may however disable the auto tuning features for some network settings that the registry provides the operating system. Microsoft recommends that you use the registry and as always, be careful, and make a backup.

Microsoft has a few articles on their website about this which can be found here.

And here.

Auto Disconnect Registry Editor Example:

Use Registry Editor to increase the default time-out period. To do this, follow these steps, and then quit Registry Editor:

  1. Click Start, click Run, type regedit or type regedt32 (Windows NT 4.0), and then click OK.
  2. Locate and then click the following key in the registry:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
    NOTE: The client side session is automatically disconnected when the idling time lasts more than the duration that is set in KeepConn. For this reason, the session is disconnected according to the less set duration value between AutoDisConnect and KeepConn. To modify the timeout duration in the client side during a UNC connection, specify the arbitrary time in KeepConn from registry value.
    Locate and then click the following key in the registry:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\lanmanworkstation\parameters
    Value: KeepConn
    Data type : REG_DWORD
    Range : 1 to 65535 (sec)
    Default value: 600 sec = 10 mins
  3. In the right pane, click the autodisconnect value, and then on the Edit menu, click Modify. If the autodisconnect value does not exist, follow these steps:
    1. On the Edit menu, point to New, and then click REG_DWORD.
    2. Type autodisconnect, and then press ENTER.
  4. On the Edit menu, click Modify.
  5. Click Hexadecimal.
  6. In the Value data box, type ffffffff, and then click OK.

Auto Disconnect Command Line Example:

For example, to set the Autodisconnect value to 30 minutes, you would run the following command line:
net config server /autodisconnect:30

The valid value range is -1 to 65535 minutes at the command line. To disable Autodisconnect set it to -1.

Setting Autodisconnect to 0 does not turn it off and results in very fast disconnects, within a few seconds of idle time. (However, the RAS Autodisconnect parameter is turned off if you set it to a value of 0.)

NOTES:

  • It is preferable to modify the LAN Autodisconnect directly in the registry. If you modify it at the command line, Windows NT and Windows 2000 may turn off its autotuning functions. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
    128167 (https://support.microsoft.com/kb/128167/EN-US/) Server Service Configuration and Tuning
    The valid value range if you edit the LAN Autodisconnect parameter in the registry is 0 to 4294967295 (Oxffffffff).
  • For a Windows 2000 Server in a Domain, running either as a domain controller or as a server, the maximum value is 65,535 (0xffff). Values set above this will be returned to 0xffff after policy refresh. Windows 2000 Servers in a workgroup may be set to any value as indicated.
    If you configure the Autodisconnect option to -1 at the command prompt, Autodisconnect is set to the upper value in the registry. This is approximately 8,171 years (not tested), which should be long enough to be the equivalent of turning Autodisconnect off.
  • The registry does not allow you to add a -1 value. However, that modification may be made at the command prompt with the following command:net config server /autodisconnect:-1When this is set, two additional registry keys are added:
    anndelta: REG_DWORD: 0xbb8
    announce: REG_DWORD: 0xf0

    Announce: Specifies the network announce rate, in seconds. This rate determines how often the server is announced to other computers on the network.

    Anndelta: Specifies the delta value for the announce rate, in milliseconds. This value specifies how much the announce rate can vary from the period of time specified in the announce member.
    The delta value allows randomly varied announce rates. For example, if the announce member has the value 10 and the anndelta member has the value 1, the announce rate can vary from 9.999 seconds to 10.001 seconds.

    Originally posted: By Cory Curtis on March 9th, 2009 at 11:12 pm
(Visited 1,260 times, 1 visits today)

( Share the Noogies )

Leave a Review

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Disclaimer

Technoogies.com has made every effort to ensure that the information provided is correct but is not advice. Technoogies will not accept any responsibility or liability for any errors or omissions. Technoogies Authors do not vouch for third party sites. Visit third party sites at your own risk. Technoogies is not directly partnered with any vendor or third party. This website uses cookies only for analytics and basic website functions. Technoogies does not accept any liability that might arise from accessing the data presented on this site. Links to internal pages promotes the content of Technoogies. This article does not constitute legal advice.

Disclosure of Affiliations

Technoogies.com is affiliated with Google, Amazon, and other advertisers. Running this site costs money and if it can’t sustain itself through ad's, it’ll go bye-bye. Please help me to keep that from happening with your patronage of ads that are of interest to you.

Scroll to Top