Si intenta actualizar el archivo XML de InfoPath a través del modelo de objetos de eventos / Elementos Web oa través de cualquier medio.
Mientras execting la Item.Update() hará que el siguiente error. Al actualizar el archivo XML de InfoPath en ListItem
el archivo y objetos ListItem ser desconectado.
Item.File.Update() va a resolver su problema.
StackTrace de error:
[COMException (0x81020037): El archivo SampleFile/SampleFile_2009-06-11T18_57_00.xml ha sido modificado por SHAREPOINT System 13 Junio 2009 00:25:30 +0530.] Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean badd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& PLID, String& pbstrGuid, Orientación pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Objeto& pvarAttachmentNames, Objeto& pvarAttachmentContents, Objeto& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +0 Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean badd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& PLID, String& pbstrGuid, Orientación pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Objeto& pvarAttachmentNames, Objeto& pvarAttachmentContents, Objeto& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +203
[SPException: El archivo SampleFile/SampleFile_2009-06-11T18_57_00.xml ha sido modificado por SHAREPOINT System 13 Junio 2009 00:25:30 +0530.] Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean badd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& PLID, String& pbstrGuid, Orientación pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Objeto& pvarAttachmentNames, Objeto& pvarAttachmentContents, Objeto& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +251 Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean badd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Orientación newGuidOnAdd, Int32& ulID, Objeto& objAttachmentNames, Objeto& objAttachmentContents, Boolean suppressAfterEvents) +1026 Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Orientación newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents) +182 Microsoft.SharePoint.SPListItem.SystemUpdate() +97 Peoples.WebControls.<>c__DisplayClass1.<ExportData>b__0() +993 Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Objeto del estado) +70 Microsoft.SharePoint.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2() +392 Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated SecureCode) +152 Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(esperar de devolución de llamada SecureCode, Objeto param) +345 Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated SecureCode) +86 Peoples.WebControls.CalendarExport.ExportData() +320 Peoples.WebControls.CalendarExport.ExportCalendar_Click(Objeto emisor, EventArgs e) +40 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler SourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 |
Gracias por publicar esto!
http://www.mstechblogs.com es muy informativo. El artículo es muy profesionalmente por escrito. Me gusta leer http://www.mstechblogs.com todos los días.
Gracias amigo!
Sí – Gracias por este. Tengo que usar esto en la captura de try / catch – try contiene Item.Update(). Parece resolver este problema starnge. ¿Es un problema esporádico se?
Thanks.It me está ayudando….