Directory.GetDirectories stalls on Remote Share
Clash Royale CLAN TAG #URR8PPP Directory.GetDirectories stalls on Remote Share I am using the NetworkShareAccessor found here. I cannot list folders or files. This is my code: using (NetworkShareAccessor.Access(serverAddress, domain, username, password)) { directories = Directory.GetDirectories(folderPath, "*", SearchOption.AllDirectories); } I use the same using statement to copy files to and from the share and that works fine. using When I debug, the using statement works, the share is connected, but when I step to directories = (...) the debugger stops on that line. using directories = (...) Nothing happens other than this message from Visual Studio after a minute: Managed Debugging Assistant 'ContextSwitchDeadlock' Message=Managed Debugging Assistant 'ContextSwitchDeadlock' : 'The CLR has been unable to transition from COM context 0xe60638 to COM context 0xe606f0 for 60 seconds. The thread that owns the destination context/apartment is ...