Note: This API is now obsolete.
Namespace: ITHit.WebDAV.Client
Exception | Condition |
---|---|
PropertyForbiddenException | User has not enough rights to obtain one of requested properties. |
PropertyConflictException | The client has provided a value whose semantics are not appropriate for the property. This includes trying to set read-only properties. |
PropertyException | Server returned unknown error. |
NotFoundException | This item doesn't exist on the server. |
WebDavException | Unexpected error occurred. |
string license = "<?xml version='1.0' encoding='utf... WebDavSessionAsync session = new WebDavSessionAsync(license); session.Credentials = new NetworkCredential("User1", "pwd"); IHierarchyItemAsync item = await session.OpenFileAsync(new Uri("http://server:8080/Products/Sales.txt")); LockInfo[] activeLocks = await item.GetActiveLocksAsync(); foreach(LockInfo lockInfo in activeLocks) { string timout = lockInfo.TimeOut == TimeSpan.MaxValue ? "Infinite" : lockInfo.TimeOut.TotalSeconds.ToString(); Console.WriteLine(lockInfo.Owner + " " + lockInfo.LockToken.Href + " " + lockInfo.LockToken.LockToken + " " + lockInfo.LockScope + " " + lockInfo.Deep + " " + timout); }