Re: directory.exists occassionally locks up when checking network share



Does anyone from Microsoft read this newsgroup? It would be nice if
someone could tell me why this is happening.

Keith



Keith Langer wrote:
Ben,

One thing that concerns me is that when this problem occurred, the
process became so locked up that it couldn't be killed and we couldn't
get the machine to reboot. We finally had to kill the winlogon service
which forced a reboot. So I don't know if the background thread is
going to allow itself to be aborted so easily.

But your suggestion is something that I actually implemented a short
while ago. Since I can't reproduce the problem locally, I'll have to
wait until next week to test it.

Keith


Ben Voigt wrote:
"Keith Langer" <tanalbit@xxxxxxx> wrote in message
news:1157125366.490006.37070@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I'm running the .Net 1.1 framework on XP Pro. I am finding some
occasions where a call to Directory.Exists never returns when passing
in a network share. Most of the time the call returns properly, but if
the machine is really busy or if there is a network problem (or if the
server's Secondary Logon or Server services have failed), then this
problem can surface. This causes my application to hang indefinitely.
Is there some a framework patch to fix this or some other way to
prevent it?

Start the I/O on a new thread and then wait on the thread with a timeout...
In .Net 2.0 you could use BackgroundWorker, in 1.1 you have to write a
little more code yourself.


thanks,
Keith Langer


.


Loading