Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Exception on Sumbit/Approve and Commit
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 21st July 09:17
kethari kamalanathan
External User
 
Posts: 1
Default Exception on Sumbit/Approve and Commit


Hello All:

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
appreciated.

Thanks,
Kethari
  Reply With Quote


  sponsored links


2 21st July 09:17
stefan [msft]
External User
 
Posts: 1
Default Exception on Sumbit/Approve and Commit


Hi Kethari,

did you call this code from within an event handler?
If not, please post the complete code. You might need to include more
commits.

Cheers,
Stefan.
  Reply With Quote
3 21st July 09:17
stefan [msft]
External User
 
Posts: 1
Default Exception on Sumbit/Approve and Commit


Hi Kethari,

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:

your coding:
oldDefaultPosting.Placeholders["htmlHeader"].Datasource.RawContent =
oldDefaultPosting.Placeholders["htmlContent"].Datasource.RawContent;

correct coding:
HtmlPlaceholder htmlHeader = (HtmlPlaceholder)
oldDefaultPosting.Placeholders["htmlHeader"];
htmlHeader.Html = oldDefaultPosting.Placeholders;

or in short:

((HtmlPlaceholder) (oldDefaultPosting.Placeholders["htmlHeader"])).Html =
oldDefaultPosting.Placeholders;


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.

Regards,
Stefan.
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666