Microsoft KB Archive/927018

= Sharing violation error message if you use WDS 2.6.5 to index a network share and if you open a file on the network share from a Windows XP-based computer =

Article ID: 927018

Article Last Modified on 12/26/2006

-

APPLIES TO

 Microsoft Windows XP Service Pack 1, when used with:  Microsoft Windows XP Professional

 Microsoft Windows XP Home Edition  Microsoft Windows XP Service Pack 2, when used with:  Microsoft Windows XP Professional

 Microsoft Windows XP Home Edition</li></ul> </li></ul>

-

<div class="symptoms_section">

SYMPTOMS
When you open a file that resides on a network share, you may receive a sharing violation error message. This issue occurs if the following conditions are true:
 * You used Windows Desktop Search (WDS) version 2.6.5 to index a &quot;My Documents&quot; folder that has been redirected to the network share. You did this from a Microsoft Windows XP-based client computer.
 * You used a second Windows XP-based computer to open a file that resides on the network share.

<div class="cause_section">

CAUSE
This issue occurs if the file that you open has been indexed by WDS and if the WindowsSearchFilter.exe filtering process used &quot;SHARE ACCESS = READ&quot; permissions to open the file.

<div class="moreinformation_section">

MORE INFORMATION
This issue typically occurs in the following scenario:
 * A user is logged on to two client computers. For example, the user is logged on to computer 1 and to computer 2.
 * The user runs WDS on client computer 1 to index the “My documents” folder that is stored on the server.
 * From computer 2, the user opens a file that is stored in the “My Documents” folder on the server. For example, the user opens a Microsoft Word document.

In this scenario, the user may receive a sharing violation (SHARING_VIOLATION) error message.

When many programs and tools open and close a file several times, WDS is notified about the possible changes that have been made to the file. WDS starts to index the file. If you try to open the file, you receive a sharing violation error message because WDS opens files that are stored on the network share by using &quot;SHARE ACCESS = READ&quot; permissions.

In this scenario, the network monitor trace may resemble the following:

<pre class="fixed_text">385      Client A requests an open of file TESTWDS.TXT with Access = Read and Share Access = Read 393      Client B requests an open of file TESTWDS.TXT with Access = Read and Write and Share Access = Read 394      Server allows client A to open the file and grants a Batch Oplock 398      Server sends an Oplock Break request to client A bumping the Oplock down to level 2 399      Client A replies to the Server that the Oplock is now at level 2 400      Server denies client B’s open request with a STATUS_SHARING_VIOLATION

WDS opens files that reside on a network by using &quot;SHARE ACCESS = READ&quot; permissions instead of by using &quot;SHARE ACCESS = READ/WRITE&quot; permissions or &quot;SHARE ACCESS = READ/WRITE/DELETE&quot; permissions. This behavior prevents the file from changing while WDS is reading the file. If the file is changed while WDS is reading the file, the IFilters interface could crash.

With its current architecture, WDS cannot use filter oplocks on remote volumes. WDS does not receive an oplock break because the oplock break is handled at the Redirector (RDR) level and is not propagated to the calling program. Currently, WDS cannot block access to a file that is located in a remote location if the data is sent to the remote server. This is expected behavior.

<div class="references_section">