DOS ERROR 59

455 views
Skip to first unread message

Ronaldo Geniais

unread,
Jul 16, 2021, 3:33:02 PM7/16/21
to Harbour Minigui
DOS ERROR 59
working with DBF, randomly when I select a DBF, error 59 occurs.
I'm working on a network with windows server, the folder is shared and mapped as a network drive, user with full access to the folder.
Would this have any relationship with the number of connections to the server?
"windows access cals"

Auge & Ohr

unread,
Jul 23, 2021, 8:02:12 PM7/23/21
to Harbour Minigui
hi,

as you have got no Answer yet i try to give some "Keywords" about DOS ERROR 59


> the folder is shared and mapped as a network drive, user with full access to the folder.

i guess you are still using "Drive Letter" with Lanmanager over UPD Port 135-139 ( Check Network-Resource on Server )
since Windows Vista it is recommend to use UNC-Path ( \\Server\MyFolder ) instead of Drive Letter

why ?

UDP Ports are "closed" by Windows 10 while it have "Security Problem" ... but it still work "local" and in Network.
those Port will be "closed" after "Time-out" and SMB-11 does not "re-connect"

newer PC have "Energy-Saving" so Network-Card will go "sleep"

now SMB-2, over Port 445, include "Authentication" with every IP-Packet so it will "login" after "awake" (need Time) from "Sleep"

Sample :
make a *.LNK from File ( *.DOCx, *.XLSx, *.TXT ) on Server and send Shortcut to Desktop
Dblclick on *.LNK will open File even you have not touch Server before

--- todo :

DISABLE on every PC SMB-1 ( Apps -> "Program and Features" -> "Windows Features" -> SMB 1.0 / CIFS )

do not use "old Style" with Drive-Letter and SMB1

instead of
   cDBF := "X:DUMMY.DBF"
use
   cDBF := "\\192.168.XXX.XXX\DUMMY.DBF"
   
   USE (cDBF) VIA ...
   IF NetErr()

always check for NetErr()
"thiink" of "time-out" or "connection lost" ( e.g. Wifi )

use DBF in "share" Mode only "as long as need" ( Opportunistic Locking )
https://docs.microsoft.com/en-us/windows/win32/fileio/opportunistic-locks

as SMB-2 have a "local Cache"
it is recommend to set

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters
FileInfoCacheLifetime
FileNotFoundCacheLifetime
DirectoryCacheLifetime

to "0" ( Zero ) to disable SMB-2 "local Cache"
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-7/ff686200(v=ws.10)?redirectedfrom=MSDN

p.s not need when local Folder is "shared" in Network

--- Check SMB Connection

as i say check Ports of Resource-Monitor on Server ( Perfmon.exe /res -> Network -> TCP )

SMB1 default is not installed in Windows 10 but when have "upgrade" from older OS it is still active
you can enable Log on Server using Powershell :

   Set-SmbServerConfiguration -AuditSmb1Access $true

than open DBF on Server and e.g APPEND Record from ( large ) CSV and watch on which Port you got Traffic

later you can check for Event 3000 in System Logfile with „Microsoft-Windows-SMBServer\Audit“
than you can "identify" which Workstation is still using SMB1

...

hope those Tips help you
Jimmy
Reply all
Reply to author
Forward
0 new messages