0
Reply

OpenRemoteBaseKey throwing an IOException

Lior

Lior

Jun 9 2010 2:24 AM
2.2k

Hello all,
I'm working on a library (DLL) for automation related tasks in our company, one such task is opening and reading from the registry (of the local or remote machine).
This is achieved by using the RegistryKey.OpenRemoteBaseKey method.
Occasionally however, this method is throws an IOException with the message: "Remote procedure call failed".
The method is called usually after a machine restart, not sure whether this is related or not.
I haven't been able to determine the exact scenario that causes this behaviour (most of the time it fails with the exception).
 
Anybody else had the same problem? am i missing something obvious?
 
Any help would be appreciated!
 
Regards,
Lior.