Kethari kamala 2012-07-21 09:17:17
I have an issuw when I try to Submit or Approve a posting
and then Commiting it using PAPI.
Application hangs and returns with an exception
“Failures occurred during the multi-object commit. One or
more objects modified in this session could not be
committed. The session transaction was rolled-back.
Contact the site administrator.”
Not really sure whats going wrong. Any thoughts
Stefan [msft] 2012-07-21 09:17:19
did you call this code from within an event handler?
If not, please post the complete code. You might need to include more
Stefan [msft] 2012-07-21 09:17:35
here are some remarks:
1) never(!) use DataSource.RawContent. This is highly not recommended and
relies on the internal datastructures in a specific version of the product.
Any ServicePack or hotfix might break your functionality!
You should recode your code to the correct and recommended syntax:
HtmlPlaceholder htmlHeader = (HtmlPlaceholder)
htmlHeader.Html = oldDefaultPosting.Placeholders;
or in short:
((HtmlPlaceholder) (oldDefaultPosting.Placeholders[“htmlHeader”])).Html =
2) you are using an existing AppContext in this routine. It is not possible
to see what happend previously. You should create and disponse the
AppContext in the same event handler if you are using an ASP.NET
application. Or do ALL users use the same AppContext? This would also cause
the error you have seen with multi-object commit due to the fact that
different users might work in parallel.