SPFileLOck Exception in sharepoint 2010?


i am trying to lock a file for an Year through an Event Receiver i am getting SPFIleLockException , below is my code

 file.Lock(SPFile.SPLockType.Exclusive, id, System.TimeSpan.FromDays(365)); 

but when i use the below code it works 

 file.Lock(SPFile.SPLockType.Exclusive, id, System.TimeSpan.FromMinutes(20));

i just need to know if there is any limit on TimeSpan for which we can apply lock to a document and if there is Time Limit then can we incease it.



February 23rd, 2014 5:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics