Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2005

Tip: Looking for answers? Try searching our database.

Closing handle

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Schmitz - 12 Apr 2005 16:52 GMT
Hi,

I've got the following problem: My current project consists of several
clients and all of them use(read) a file, that is placed on a shared hard
disk on one of my file servers (windows2k). So, every user that is logged on
a computer the client software runs on needs access (exclusive) to this file.
Now, the problem is, that sometimes the users leave the file in an open
state - and do not close their handle - so no other client can access the
file any longer.
That's why I'm looking for a way to close all handles (even of remote
clients) to a specific file "by violance". Is this possible?

Thanks
Peter
William DePalo [MVP VC++] - 12 Apr 2005 17:36 GMT
> I've got the following problem: My current project consists of several
> clients and all of them use(read) a file, that is placed on a shared hard
[quoted text clipped - 7 lines]
> That's why I'm looking for a way to close all handles (even of remote
> clients) to a specific file "by violance". Is this possible?

How will you ever be able to distinguish the case where a client validly
maintains a handle to a file for an extended period from one which breaks
your rules (unspoken here) ?

Some advice FWIW:

1) When the operating system appears to get in the way (here by protecting
handles), think harder about the design
2) Rather than require the clients to have exclusive access to a file,
centralize the file updates and have the clients make requests of the common
updater

Regards,
Will
Niray - 12 Apr 2005 17:44 GMT
Peter, I have had the same problem accessing the file, but i didn't
have exclusive user rights to the directory. We had the directory
permissions set for ASP Net Account. It worked for me on closing the
file handle and any related objects in the finally block.

> > I've got the following problem: My current project consists of several
> > clients and all of them use(read) a file, that is placed on a shared hard
[quoted text clipped - 22 lines]
> Regards,
> Will

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.