XmlPlaceholder ReadOnly
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > XmlPlaceholder ReadOnly




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    XmlPlaceholder ReadOnly  
Charly


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-18-06 03:50 AM

Trying  to write to XmlPlaceholder, (XmlAsString property) using the
code below
(dLinks is XmlDocument,
cHC  is CmsHttpContext):

if (P.State == PostingState.New)
{
Template LLTemp =  (Template)cHC.Searches.GetByGuid(
HsConst.LINKLISTGUID);
Channel Chan = cHC.Channel;
P = Chan.CreatePosting(LLTemp);
}
XmlPlaceholder phLinks = HLL.Posting.Placeholders["Links"] as
XmlPlaceholder;
if (phLinks != null)
phLinks.XmlAsString = dLinks.OuterXml; // ************* Error
HERE
cHC.CommitAll();

and I get this error on the line indicated above. ANy ideas ???

Microsoft.ContentManagement.Publishing.CmsInvalidObjectStateException:
Cannot modify read only object.  The target object is read only and it
cannot be modified. ---> System.Runtime.InteropServices.COMException
(0x80041BD6): Cannot modify read only object.  The target object is
read only and it cannot be modified.
at
Microsoft.ContentManagement.Interop.Publishing.IRcwPosting.__BeginWrite(Bool
ean
ignoreMarkedForActions)
at Microsoft.ContentManagement.Publishing.Posting.BeginWrite(Boolean
ignoreMarkForActions)
--- End of inner exception stack trace ---
at Microsoft.ContentManagement.Publishing.Posting.BeginWrite(Boolean
ignoreMarkForActions)
at Microsoft.ContentManagement.Publishing.Posting.BeginWrite()
at
Microsoft.ContentManagement.Publishing.Events.PostingEvents.OnPlaceholderPro
pertyChanging(Placeholder
target, String propertyName, Object& propertyValue)
at
Microsoft.ContentManagement.Publishing.Placeholder.BeginWrite(String
propertyName, Object& propertyValue)
at
Microsoft.ContentManagement.Publishing.Extensions.Placeholders.XmlPlaceholde
r.set_XmlAsString(String
value)
at Vss.HS.Sys.CMS.Templates.LinkList.SaveLinksData() in
d:\websites\hscms\templates\linklist.aspx.cs:line 297
at Vss.HS.Sys.CMS.Templates.LinkList.SaveData() in
d:\websites\hscms\templates\linklist.aspx.cs:line 278
at Vss.HS.Sys.CMS.Templates.LinkList.Save() in
d:\websites\hscms\templates\linklist.aspx.cs:line 233
at Vss.HS.Sys.CMS.Templates.LinkList.Page_Load(Object sender,
EventArgs e) in d:\websites\hscms\templates\linklist.aspx.cs:line 103
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:08 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register