Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Cmserver Evaluation > mode exception:...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 552 of 601
Post > Topic >>

mode exception: Invalid mode for update

by =?Utf-8?B?YmVpdGE=?= <beita@[EMAIL PROTECTED] > Apr 7, 2006 at 03:25 AM

hello All:

when I want to create a posting  using the following code ,it repalies a 
exception:

System.Runtime.InteropServices.COMException: Invalid mode for update. The 
requested action modifies the state of an object and can only be performed

when the session is in the 'Update' mode.

but i have change to the update mode:

how can i to deal with it
??!  help !  thank you 

here is the code:

CmsApplicationContext cmsAppConontext=new CmsApplicationContext();

cmsAppConontext.AuthenticateAsUse(name,passwordPubli****ngMode.Published);
			
string path="/Channels/ccclub.cmbchina.com/servicecenter/"+channelName;
(Channel) postr=(Channel)cmsAppConontext.Searches.GetByPath(path);
if(cmsAppConontext.UserCanAuthor)
{

Template 
objTemplate=(Template)cmsAppConontext.Searches.GetByPath("/Templates/CreditCard/special/clubqa/noticetem");
Posting pageNew=objNavChannel.CreatePosting(objTemplate);
pageNew.Approve();

cmsAppConontext.CommitAll();
}
	

regard!
 




 2 Posts in Topic:
mode exception: Invalid mode for update
=?Utf-8?B?YmVpdGE=?= <  2006-04-07 03:25:02 
Re: mode exception: Invalid mode for update
"Stefan [MSFT]"  2006-04-07 12:48:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 19:50:15 CST 2008.