Unwillingly syncing network folder during program write to file

10,676

Did you figure this out yet? Try disabling Offline Files inside the share:

  1. Right click the share
  2. Go to the Sharing Tab
  3. Click on the Advanced Sharing button
  4. Click on the Caching button
  5. Select “No files or programs from the shared folder are available offline.”
  6. Click OK to close the Offline Settings pop up
  7. Click OK to close the Advanced Sharing pop up
  8. Click Close to close your share’s property box

Another thing you could try from the client PC is to disable the Offline Files service if this is Win7/Vista.

Let us know how it works out.

Share:
10,676

Related videos on Youtube

Thalia
Author by

Thalia

Updated on September 18, 2022

Comments

  • Thalia
    Thalia almost 2 years

    I am trying to write a program that does some reading/processing/writing.

    While everything works fine when I give my program a local path, I am faced with an unusual problem: huge memory usage when I process files over the local area network.

    If the file path is something like "//network_address/folder/*.ext" the program uses about 4G RAM (as opposed to 500 - 1G when the path is something like "c:/folder/*.ext")

    I used Process Monitor to see what is going on and noticed consistent read failures in the "c:\windows\csc\v2.0.6\namespace" folder - which I hadn't even known existed. Researching it, I found that it was used to sync files with a network server, perhaps to view network files offline.

    The above failures were happening exactly before a write to file process started (not before reads), the namespace folder did not get used, I had nothing synced, and the actual writes to the network drives were successful.

    I haven't set up any option to sync folders... (and I don't want to)

    As soon as I took ownership of that folder, the memory usage went down (though I still got read errors in Process Monitor).

    So... I think my problem is I have been trying to do something I am not allowed to, and using a lot of memory to hold data while I am trying to do what I am not allowed, until I fail and finally put the data where it belongs...

    The solution: avoid doing things that I am not allowed to do, right ?

    Is there a way (preferably a command line that I can run in my code, or a registry entry I can modify) that can prevent my program from syncing files (if that is what is happening) or using that namespace folder when reading off a network drive ?

    How can I prevent Windows from syncing files behind my back, and just writing files directly to the network folder ?

    • Oliver Salzburg
      Oliver Salzburg almost 12 years
      From reading your question, I must assume that you're misinterpreting your observations in Process Monitor. If procmon shows read failures in the CSC cache, that sounds like something I would expect if Offline Files is turned off. Otherwise it wouldn't be a read failure, it would be a read success. So, I would assume the issue is a different one. I think your problem might be more programming related as the solution might best be obtained through debugging and profiling. Good luck :)
    • Thalia
      Thalia almost 12 years
      @OliverSalzburg: Thanks, I haven't looked at it this way - still when I took ownership to the folder, the memory used dropped dramatically... So I was hoping of a way to simply not use it.
  • Thalia
    Thalia almost 12 years
    The network shares that I was trying to access don't belong to me, and therefore I have no access to the Sharing settings. They are Shared with everyone on the network... (offline availability: Not available). Still to me it made a difference when I changed the settings in the CSC cache folder - I still don't understand why or don't know how to revert the change so I can test my hypothesis.
  • cwheeler33
    cwheeler33 almost 12 years
    what specific changes did you make? And how did you make them?
  • Thalia
    Thalia almost 12 years
    As I stated in my original post, I took ownership of that folder.