protected virtual void Dispose(bool disposeManagedResources) { if (!this.disposed && disposeManagedResources) { try { SafeRefCountedContainer <WindowsIdentity> authorizedUserIdentity = DataServiceController.Current.GetAuthorizedUserIdentity(this.dataContext.UserContext); authorizedUserIdentity.Release(); } catch (UnauthorizedAccessException unauthorizedAccessException) { } } this.disposed = true; }