Using a .NET FileWatcher with a dfs properly

There is not a lot of information with practical experience about the Microsoft .NET File Watcher Technology available in the internet. So here some advices.

How it works

It is basically a wrapper around the windows api function ReadDirectoryChangesW.

Possible restrictions with remote locations

There might be several limitations in place that you usually cannot see:


Run .NET Applications in 32-Bit Mode under 64-Bit Windows

Sometimes it is necessary to run .NET applications in 32-Bit mode. One example is the usage of Adobe Reader Interop Libraries which will crash if they run in 64-Bit mode.

cd C:\Windows\Microsoft.NET\Framework64\v2.0.50727
ldr64 setwow

This will force all .NET applications to be run in 32-Bit mode.

Subscribe to RSS - .NET