Word Files are opening in Readonly mode

710 Views Asked by At

I have program which get the word file from server and after editing it saved back to server . It was working and i was able to save files back to server but suddenly files are opening in Readonly mode . I have searched alot on google and have tried all options but it seems not working.Any ideas clues ??

1

There are 1 best solutions below

0
On

If the file displays as read only in Word that means word thinks the file is readonly, which means its seen something to make it think that. Since word does not integrate with access control methods over webdav, that means it can only be that word has determined that the server does not support required operations for writing. This can be:

  • does not support uploading (ie PUT). Webdav reports this in the OPTIONS request, so please check for that
  • does not support locking (ie LOCK)
  • does support locking, and the file is locked. But this usually gives the user a specific warning

Locking comes into play in different ways depending on how you're connecting to the server (on windows you can either use a mapped drive or a network location), and the means of opening (either clicking a link in a web page which uses the sharepoint dll, or opening directly from a mapped drive, or opening from the file open dialog in MS office), and of course the application doing the opening (ie MS Office, Open Office, etc)

Depending on what combination of the above you're using locking might or might not be required to edit.

Webdav indicates locking support in the following ways - the supported levels header - MS-Author-VIA header, which should return "webdav" - the presence of LOCK in the OPTIONS response.

So you might need to check for the presense of those, probably by using wireshark or similar.