Microsoft Content Management Server - CMS Error while approving.

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > September 2004 > CMS Error while approving.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author CMS Error while approving.
Murty

2004-09-23, 9:18 am

I have the following code (using CMS api) to Approve a posting.. The code is
working fine in many environments. It is failing in couple of environments.
Any ideas on why it is failing?

Sample Code:

postingToBeSorted.SortOrdinal = newSortOrdinal;
string tempValue = postingToBeSorted.CustomProperties[0].Value;
postingToBeSorted.CustomProperties[0].Value = tempValue;
postingToBeSorted.Submit(); this.CmsAppContext.CommitAll();
postingToBeSorted.Approve(); this.CmsAppContext.CommitAll();
postingToBeSorted.ReleaseOwnership(); this.CmsAppContext.CommitAll();

Error logged:

Exception:
Microsoft.ContentManagement.Publishing.CmsInvalidObjectStateException
Message: Posting is not ready for approval. This action can only be
performed if this posting is ready for approval.
Source: Microsoft.ContentManagement.Publishing at
Microsoft.ContentManagement.Publishing.Posting.Approve()

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com