Solution for Windows Network Share mapped drive connection may be lost

  
Found a strange problem: On Windows operating system, how to map a drive to a network share may make the connection lost, now let's talk about how I solved this problem of.

On a computer running one of the Windows versions listed at the beginning of this article, if you map a drive to a network share, the mapped drive may be disconnected after a fixed period of inactivity, and Windows Explorer may display a red "X” on the icon of the mapped drive. However, if you try to access or browse a mapped drive, it will reconnect quickly. To resolve this issue, change the default timeout period on the shared network computer. To do this, use one of the following methods. Registry Editor Warning: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you will be able to resolve problems caused by improper use of the Registry Editor. Use Registry Editor at your own risk. Use the Registry Editor to increase the default timeout period. To do this, follow these steps, and then quit Registry Editor: Note: You cannot use this method to turn off the automatic disconnect feature of the server service. You can only use this method to change the default timeout period for the auto disconnect feature. Click “Start”, click “Run", type regedit (Windows 2000 or Windows Server 2003) or type regedt32 (Windows NT 4.0), and then click “OK". Locate and then click the following registry key in the registry: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceslanmanserverparameters In the right pane, click the autodisconnect value, and then click “Modify” on the “Edit” menu. If the autodisconnect value does not exist, follow these steps: On the “Edit” menu, point to “New”, then click “REG_DWORD”. Type autodisconnect and press Enter. On the "Edit" menu, click “Edit”. Click “hexadecimal”. Type ffffffff in the "Value data" box, then click “OK”. Note: If the idle time is longer than the one set in KeepConn, the client session will automatically disconnect. Therefore, the session is disconnected by setting a shorter duration value in AutoDisConnect and KeepConn. To change the timeout in the client during a UNC connection, specify any time in KeepConn. Locate and then click the following registry key in the registry: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicelanmanworkstationparameters Value: KeepConn Data Type: REG_DWORD Range: 1 to 65535 (seconds) Default: 600 seconds = 10 minutes Command line Note: If you use this method, you may Turn off the automatic adjustment of the server service. To change the default timeout period for the automatic disconnect feature of the server service, open a command prompt, type the following command line, and then press ENTER: net config server /autodisconnect:number , where number is the network drive where the server is down mapped The number of minutes to wait before connecting. The maximum value for this command is 65,535. Note: Setting the auto-disconnect value to 0 does not mean that the auto-disconnect feature is turned off, but rather that the server service disconnects the mapped network drive only after a few seconds of inactivity. To turn off automatic disconnection, open a command prompt, type the following command line, and then press ENTER: net config server /autodisconnect:-1

Copyright © Windows knowledge All Rights Reserved