none
[E2013][EWS]Failed to update PostItem in Public Folder. RRS feed

  • Question

  • When I am using EWS to change the MIME content of a public item, it will always throw this exception: "Operation would change object type, which is not permitted."

    Below is the original MIME content of a public folder item

    From: Administrator <Administrator@ex2013.com>
    Subject: test
    Thread-Topic: test
    Thread-Index: Ac4ecdcQqta6k99+S16ywy+fe2Yksg==
    Date: Tue, 12 Mar 2013 00:02:35 +0800
    Message-ID: <f31c25f8520941269f566cff8deb46ea@EX2013SMEX.EX2013.COM>
    Content-Language: en-US
    X-MS-Has-Attach:
    X-MS-TNEF-Correlator:
    Content-Type: multipart/alternative;
    boundary="_000_f31c25f8520941269f566cff8deb46eaEX2013SMEXEX2013COM_"
    MIME-Version: 1.0
    --_000_f31c25f8520941269f566cff8deb46eaEX2013SMEXEX2013COM_
    Content-Type: text/plain; charset="us-ascii"
    testkey
    --_000_f31c25f8520941269f566cff8deb46eaEX2013SMEXEX2013COM_
    Content-Type: text/html; charset="us-ascii"
    <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
    <meta name="Generator" content="Microsoft Word 15 (filtered medium)">
    <style><!--
    /* Font Definitions */
    @font-face
    {font-family:SimSun;
    panose-1:2 1 6 0 3 1 1 1 1 1;}
    @font-face
    {font-family:"Cambria Math";
    panose-1:0 0 0 0 0 0 0 0 0 0;}
    @font-face
    {font-family:Calibri;
    panose-1:2 15 5 2 2 2 4 3 2 4;}
    @font-face
    {font-family:"\@SimSun";
    panose-1:2 1 6 0 3 1 1 1 1 1;}
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {margin:0in;
    margin-bottom:.0001pt;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";}
    a:link, span.MsoHyperlink
    {
    color:#0563C1;
    text-decoration:underline;}
    a:visited, span.MsoHyperlinkFollowed
    {
    color:#954F72;
    text-decoration:underline;}
    span.EmailStyle17
    {
    font-family:"Calibri","sans-serif";
    color:windowtext;}
    .MsoChpDefault
    {
    font-family:"Calibri","sans-serif";}
    @page WordSection1
    {size:8.5in 11.0in;
    margin:1.0in 1.0in 1.0in 1.0in;}
    div.WordSection1
    {page:WordSection1;}
    --></style><!--[if gte mso 9]><xml>
    <o:shapedefaults v:ext="edit" spidmax="1026" />
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1" />
    </o:shapelayout></xml><![endif]-->
    </head>
    <body lang="EN-US" link="#0563C1" vlink="#954F72">
    <div>
    <p>testkey<o:p></o:p></p>
    </div>
    </body>
    </html>
    --_000_f31c25f8520941269f566cff8deb46eaEX2013SMEXEX2013COM_--
    Monday, March 11, 2013 11:46 AM

All replies

  • And the following is the new MIME content I'd like to replace the original one.

    From: Administrator <Administrator@ex2013.com>
    Subject: test
    Thread-Topic: test
    Thread-Index: Ac4ecdcQqta6k99+S16ywy+fe2Yksg==
    Date: Tue, 12 Mar 2013 00:02:35 +0800
    Message-ID: <f31c25f8520941269f566cff8deb46ea@EX2013SMEX.EX2013.COM>
    Content-Language: en-US
    X-MS-Has-Attach:
    X-MS-TNEF-Correlator:
    Content-Type: multipart/alternative;
    boundary="_000_f31c25f8520941269f566cff8deb46eaEX2013SMEXEX2013COM_"
    MIME-Version: 1.0

    --_000_f31c25f8520941269f566cff8deb46eaEX2013SMEXEX2013COM_
    Content-Type: text/plain;
    charset="utf-8"
    Content-Transfer-Encoding: base64

    QSBwb2xpY3kgdmlvbGF0ZWQgY29udGVudCB3YXMgZGV0ZWN0ZWQgYW5kIHJlbW92ZWQgZnJvbSB0
    aGUgb3JpZ2luYWwgbWFpbCBoZWFkZXIsIHN1YmplY3QsIGJvZHkgb3IgYXR0YWNobWVudCAuIFlv
    dSBjYW4gc2FmZWx5IHNhdmUgb3IgZGVsZXRlIHRoaXMgcmVwbGFjZW1lbnQgYXR0YWNobWVudC4=

    --_000_f31c25f8520941269f566cff8deb46eaEX2013SMEXEX2013COM_
    Content-Type: text/html;
    charset="utf-8"
    Content-Transfer-Encoding: base64

    QSBwb2xpY3kgdmlvbGF0ZWQgY29udGVudCB3YXMgZGV0ZWN0ZWQgYW5kIHJlbW92ZWQgZnJvbSB0
    aGUgb3JpZ2luYWwgbWFpbCBoZWFkZXIsIHN1YmplY3QsIGJvZHkgb3IgYXR0YWNobWVudCAuIFlv
    dSBjYW4gc2FmZWx5IHNhdmUgb3IgZGVsZXRlIHRoaXMgcmVwbGFjZW1lbnQgYXR0YWNobWVudC4=

    --_000_f31c25f8520941269f566cff8deb46eaEX2013SMEXEX2013COM_--

    Thanks for any help.

    Monday, March 11, 2013 11:47 AM
  • And the following is related EWS statements.

        item.MimeContent.Content = actualContent;

        item.Update(ConflictResolutionMode.AlwaysOverwrite);

    Monday, March 11, 2013 11:51 AM