Network problems with Windows Server 2003

Network problems with Windows Server 2003

Postby Marco Turco » Tue Apr 08, 2008 1: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby Antonio Linares » Tue Apr 08, 2008 2:12 pm

Marco,

Where exactly have you placed the SysWait() call ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marco Turco » Tue Apr 08, 2008 2:49 pm

I simply added SYSWAIT() without arguments
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby driessen » Tue Apr 08, 2008 3: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Marco Turco » Tue Apr 08, 2008 3: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby Antonio Linares » Tue Apr 08, 2008 6:09 pm

Marco,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marco Turco » Tue Apr 08, 2008 8: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby Marco Turco » Wed Apr 09, 2008 9: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests