PDA

Click to See Complete Forum and Search --> : File on FTP Server is locked after FtpGetFile


rekcus
Dec 13th, 2000, 12:24 AM
Operations:

1 FTP Server running on IIS offers ftp service.
2 I write a VB ftp program to download a file.
3 To download the file I run the API:

bRet = FtpGetFile(hConnection, szFileRemote, szFileLocal & "/" & szFileRemote, False, _
INTERNET_FLAG_RELOAD, dwType, 0)

4 File download successful.

Problem: File is locked on the server. It cannot be deleted or updated. Restarting IIS doesn't help. Only way to unlock file is to restart the server.


Any clues as to why this happens?

Thanks,

dj4
Dec 13th, 2000, 11:42 PM
I know that problem, look these articles:

http://support.microsoft.com/support/kb/articles/Q191/7/42.ASP

http://support.microsoft.com/support/kb/articles/Q238/6/44.ASP

http://support.microsoft.com/support/kb/articles/Q184/9/56.ASP

http://support.microsoft.com/support/kb/articles/Q186/8/02.ASP

-Dj4

rekcus
Dec 14th, 2000, 02:18 AM
Yo dj4, thanks a bunch.

But check out the workaround suggested by MSoft:

First:

To work around this problem, use a different editor or use the Registry Editor to disable caching of file handles.

WARNING: Disabling caching of file handles may seriously impact the performance of your Internet Information Server computer. Use this workaround with caution.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.


Second:

This problem was corrected in Internet Information Server 5.0.


Regs,