我一直在DotCMIS.dll中发生'DotCMIS.Exceptions.CmisRuntimeException'类型的第一次机会异常 CmisRuntimeException当我尝试更新CmisObject时未经授权。这是我的代码,任何人都可以提供帮助。
IOperationContext oc = session.CreateOperationContext();
oc.CacheEnabled = false;
oc.FilterString = "cmis:name, cmis:objectId, cmis:objectTypeId";
ICmisObject doc = session.GetObject(curProj.SharePointId, oc);
if (doc != null)
{
try
{
String fileName = curProj.ProjectFilePath.Substring(curProj.ProjectFilePath.LastIndexOf('\\') + 1);
IDictionary<String, Object> properties = new Dictionary<String, Object>();
properties.Add(PropertyIds.Name, fileName);
ICmisObject objectId = doc.UpdateProperties(properties);
}
catch (DotCMIS.Exceptions.CmisRuntimeException re)
{
System.Console.WriteLine("CmisRuntimeException " + re.Message);
}
catch (DotCMIS.Exceptions.CmisConstraintException cce)
{
System.Console.WriteLine("CmisConstraintException " + cce.Message + " " + doc.GetPropertyValue(PropertyIds.ObjectId));
}
}