FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Network problems with Windows Server 2003
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Network problems with Windows Server 2003
Posted: Tue Apr 08, 2008 01:21 PM

Hi all,
I have a really strange problem on a Windows XP workstation that read the data from a network drive hosted on Windows 2003 Server.

I - before to execute any procedure in my app - call the function CheckAccess(cFile) that is a simply function that try to open cFile in read/write mode to know if there are network connection problems.

This is the function :

function CheckAccess(cFile)
local nRetCode,handle,nError,cFile,lReturn

if file(cFile)
lReturn:=.t.
handle:=fopen(cFile,2+64)
nError:=ferror()
if nError>0
lReturn:=.f.
endif
fclose(handle)

if .not. lReturn
    errore("Disk problem")
    return(-1)
endif

endif
return(0)

The problem is that only on two workstation of six an error 5 (access denied) appairs making the test on a network file.
I made a lot of tests and the windows user can access to that file through Explorer and can rename and delete it.

I solved this problem casually simply adding SYSWAIT() at the beginning of that function.

My question:
Is this a FWH/xHarbor related problem or a Windows 2003 problem ?

I made a search on google and I seen some threads about random access denied problem on Windows 2003 server, is there anyone that have had the same problem ?

I am in doubt that solving the problem on this check routine I only move the problem directly on the next step (the DATA FILES) !!
Do I have to put a "syswait" before to open any files with FOPEN ?

Any ideas appreciated.

Thanks.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Network problems with Windows Server 2003
Posted: Tue Apr 08, 2008 02:12 PM

Marco,

Where exactly have you placed the SysWait() call ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Network problems with Windows Server 2003
Posted: Tue Apr 08, 2008 02:49 PM

I simply added SYSWAIT() without arguments

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Network problems with Windows Server 2003
Posted: Tue Apr 08, 2008 03:22 PM

Hello Marco,

Your problem looks quite strange to me. I use that function too and it runs just fine, even on Windows 2003 servers.

Could it be possible that the security settings on the server aren't correct for the user you are logged in with ? I.e. do you have access to the folder of disk you are reading or writing to ?

Regards,

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Network problems with Windows Server 2003
Posted: Tue Apr 08, 2008 03:54 PM

Hi Michel,
the first test I made has been to try to delete and rename that file via the Windows "Computer resource" and I can make this.

The strange thing is that this customer has a server with Windows 2003 server, five identical workstation with windows xp and a laptop always with XP connected to the lan.

This problem appairs only on one workstation and on the laptop.
Note that the customer use the laptop also in Terminal server mode (my app is structured to work in this mode) and in this mode the problem doesn't appairs.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Network problems with Windows Server 2003
Posted: Tue Apr 08, 2008 06:09 PM

Marco,

Have you placed the SysWait() call in between File() and FOpen() calls ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Network problems with Windows Server 2003
Posted: Tue Apr 08, 2008 08:26 PM

No, before "if file(cFile)" at the routine beginning.

SysWait()
if file(cFile)
..

I insert it there because my app can call this routine more time
so I tought to a disk cache related problem (eg. the file is still open due the previous call).

I don't know If this can be suggest you something but my app set (if needed) the windows registy to avoid network problems (oplock) using the latest Peter Rees's routines.

Source: www.softwarexp.co.uk/beta/net.zip

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Network problems with Windows Server 2003
Posted: Wed Apr 09, 2008 09:35 AM

Hi all,
It could be a domain controller related problem.

To any interested see:

www.softwarexp.co.uk/beta/search.pdf
and www.softwarexp.co.uk/beta/microsoft_support.pdf

Best Regards,



Marco Turco

SOFTWARE XP LLP

Continue the discussion