none
ActiveSync - Contacts ghosted element always deleted on 12.1 Activesync Server (Exchange server 2007 SP1) RRS feed

  • Question

  • Hi there,

              I am now testing ActiveSync12.1 on Exchange Server2007 SP1,

    I follow below linked http://msdn.microsoft.com/en-us/library/dn292988(v=exchg.80).aspx to testing ghosted elemented.

    I found the ghosted elements will always deleted whatever field is within the <Supported> elements or not.

    My test case as Below, can you help to reviewed which step I am missing so that I always get a result of ghosted elements deleted?

    Step1:  Client send a Sync command with SyncKey=0,  and included the "Birthday" Elements in <Supported> elements.

    This means "Birthday" are not ghosted and all the other elements are  ghosted.  

     

    <?xml version="1.0" encoding="utf-8"?>

    <Sync xmlns="AirSync:">
      <Collections>
        <Collection>
          <SyncKey>0</SyncKey>
          <CollectionId>contacts:1</CollectionId>
          <Supported>
            <Birthday xmlns="Contacts:"/>
          </Supported>
        </Collection>
      </Collections>
    </Sync>

    Step2: We get the response from server and get the synKey=1 for next Sync commands.

    <?xml version="1.0"?>
    <Sync xmlns="AirSync:">
      <Collections>
        <Collection>
          <SyncKey>1</SyncKey>
          <CollectionId>contacts:1</CollectionId>
          <Status>1</Status>
        </Collection>
      </Collections>
    </Sync>

    Step3: We send another Sync command with SyncKey=1 to retrieve all the contacts from server.

    <?xml version="1.0" encoding="utf-8"?>
    <Sync xmlns="AirSync:">
      <Collections>
        <Collection>
          <SyncKey>1</SyncKey>
          <CollectionId>contacts:1</CollectionId>
        </Collection>
      </Collections>
    </Sync>

    Step4: We received response from server, let focus on the last record I highlighted with serverId=2621192503

        <?xml version="1.0"?>
    <!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
    <Sync xmlns="AirSync:">
      <Collections>
        <Collection>
          <SyncKey>2</SyncKey>
          <CollectionId>contacts:1</CollectionId>
          <Status>1</Status>
          <Commands>
            <Add>
              <ServerId>2579806543</ServerId>
              <ApplicationData>
                <Email1Address xmlns="Contacts:">iad_paket_03@t-online.de</Email1Address>
                <FileAs xmlns="Contacts:">Stypa,Christian</FileAs>
                <FirstName xmlns="Contacts:">Christian</FirstName>
                <LastName xmlns="Contacts:">Stypa</LastName>
              </ApplicationData>
            </Add>
            <Add>
              <ServerId>2619474935</ServerId>
              <ApplicationData>
                <FileAs xmlns="Contacts:">Tsai</FileAs>
                <FirstName xmlns="Contacts:">Tsai</FirstName>
                <HomeCity xmlns="Contacts:">TPE</HomeCity>
                <HomePhoneNumber xmlns="Contacts:">123456</HomePhoneNumber>
                <Body xmlns="AirSyncBase:">
                  <Type>1</Type>
                  <Data>THis is NOTE</Data>
                </Body>
              </ApplicationData>
            </Add>
            <Add>
              <ServerId>2620827237</ServerId>
              <ApplicationData>
                <Anniversary xmlns="Contacts:">2012-02-08T00:00:00.000Z</Anniversary>
                <Birthday xmlns="Contacts:">2013-05-16T00:00:00.000Z</Birthday>
                <Business2PhoneNumber xmlns="Contacts:">0987654321</Business2PhoneNumber>
                <BusinessCity xmlns="Contacts:">Neigu District</BusinessCity>
                <BusinessPhoneNumber xmlns="Contacts:">(886)226598288</BusinessPhoneNumber>
                <WebPage xmlns="Contacts:">http://private.com</WebPage>
                <BusinessCountry xmlns="Contacts:">Taiwan</BusinessCountry>
                <Email1Address xmlns="Contacts:">bibi@gmail.com</Email1Address>
                <Email3Address xmlns="Contacts:">bibi@arcadyan.com.tw</Email3Address>
                <BusinessFaxNumber xmlns="Contacts:">(886)226598299</BusinessFaxNumber>
                <FileAs xmlns="Contacts:">Huang,BiBi</FileAs>
                <FirstName xmlns="Contacts:">BiBi</FirstName>
                <HomeCity xmlns="Contacts:">Zuoying</HomeCity>
                <HomeCountry xmlns="Contacts:">Taiwan</HomeCountry>
                <HomeFaxNumber xmlns="Contacts:">(886)298765432</HomeFaxNumber>
                <HomePhoneNumber xmlns="Contacts:">(886)212345678</HomePhoneNumber>
                <HomePostalCode xmlns="Contacts:">251</HomePostalCode>
                <HomeState xmlns="Contacts:">Taipei</HomeState>
                <HomeStreet xmlns="Contacts:">13F., No.83-1, Ln.169, Xinhai Rd.</HomeStreet>
                <MobilePhoneNumber xmlns="Contacts:">0987123456</MobilePhoneNumber>
                <CompanyName xmlns="Contacts:">Arcadyan</CompanyName>
                <Title xmlns="Contacts:">Title</Title>
                <BusinessPostalCode xmlns="Contacts:">114</BusinessPostalCode>
                <LastName xmlns="Contacts:">Huang</LastName>
                <BusinessState xmlns="Contacts:">Taipei</BusinessState>
                <BusinessStreet xmlns="Contacts:">5F., No.58, Lane188, Rueiguang Rd.</BusinessStreet>
                <JobTitle xmlns="Contacts:">Engineer</JobTitle>
                <Body xmlns="AirSyncBase:">
                  <Type>1</Type>
                  <Data>DO NOT EDIT OR DELETE THIS RECORD!</Data>
                </Body>
              </ApplicationData>
            </Add>
            <Add>
              <ServerId>2621192503</ServerId>
              <ApplicationData>
                <Birthday xmlns="Contacts:">1977-02-23T00:00:00.000Z</Birthday>
                <Email1Address xmlns="Contacts:">kinghong66@gmail.com</Email1Address>
                <FileAs xmlns="Contacts:">Chien,James</FileAs>
                <FirstName xmlns="Contacts:">James</FirstName>
                <HomePhoneNumber xmlns="Contacts:">12345678</HomePhoneNumber>
                <LastName xmlns="Contacts:">Chien</LastName>
              </ApplicationData>
            </Add>
          </Commands>
        </Collection>
      </Collections>
    </Sync>

    Step5: Now we send a airsync:Change commands that Changing First Name and Not Included HomePhoneNumber

    and EmailAddress

    <?xml version="1.0" encoding="utf-8"?>
    <Sync xmlns="AirSync" xmlns:contacts="Contacts">
      <Collections>
        <Collection>
          <SyncKey>2</SyncKey>
          <CollectionId>contacts:1</CollectionId>
          <Commands>
            <Change>
              <ServerId>2621192503</ServerId>
              <ApplicationData>
                <contacts:LastName>Chien</contacts:LastName>
                <contacts:FirstName>James123456</contacts:FirstName>
                <contacts:Birthday>1977-02-23T00:00:00.000Z</contacts:Birthday>
              </ApplicationData>
            </Change>
          </Commands>
        </Collection>
      </Collections>
    </Sync>

    Step6: Now check the database, we found the FirstName have been changed to James123456, this is corrected.

    But, HomePhoneNumber and Email1Address have been deleted  where I expected it should keep the value since I have added <supported> in the first sync command and not included contacts:HomePhomeNumber and contacts:Email1Address.

    Database on sever

    Before:

    Contacts Field  

    First Name:  James  

    Last Name: Chien

    Email1Address: kinghong66@gmail.com

    HomePhoneNumber: 12345678

    Birthday: 1977-02-23T00:00:00.000Z

    After:

    Contacts Field  

    First Name:  James123456

    Last Name: Chien

    Email1Address: <Delete>

    HomePhoneNumber: <Delete>

    Birthday: 1977-02-23T00:00:00.000Z

    Best Regards

    James

    Thursday, July 17, 2014 10:19 AM

Answers

  • Hi James,

    Thanks for your patience.  After doing some digging, I found that this was a known issue in v12.1 of the protocol and was fixed.  However, I suspect that your NG server is missing the update that contained the fix. Can you check to see if the failing server has:

    Update Rollup 9 for Exchange Server 2007 Service Pack 1 (KB970162)

    http://www.microsoft.com/downloads/details.aspx?FamilyID=55320be2-c65c-48bb-bab8-6335aa7d008c&displaylang=en

    ...installed?  This should contain the fix that addresses ghosted contact properties.

    If you're not sure about this, send me the complete Exchange version and build for the NG server and I can check whether you should have the correct support for these ghosted properties.

    Thanks,

    Tom

    • Marked as answer by james_chien Tuesday, August 5, 2014 1:40 AM
    Saturday, July 26, 2014 4:53 AM
    Moderator
  • Thanks James, glad to help.

    Tom

    Tuesday, August 5, 2014 6:00 AM
    Moderator

All replies

  • Hello James

    Thank you for contacting Microsoft Support. A support engineer will be in touch to assist further.

    Regards.


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Thursday, July 17, 2014 5:16 PM
  • Hi James,

    I will work with you on this question. I'll get back to you after I've had time to research a little.  Thanks for the complete details!

    Best regards,
    Tom Jebo
    Microsoft Open Specifications

    Thursday, July 17, 2014 7:04 PM
    Moderator
  • Hi Tom And Tarun,

            Thanks for looking into this issue, below provide another test case with WBXML provide. 

    In this test case, I set <Supported></Supported> in the first Sync to indicate all the elements can be ghosted  to be ghosted. Somehow this case also failure.  

    PS: The failure case is run in our customer side EAS server,  we setup another Exchange ActiveServer12.1 in our Labs and doesn't see the issue, will it be the ActiveSync server compatible issue? Is there any settings in ActiveSync server that might "disabled" this "ghosted" feature in server side? 

    Step1: Sending 1st Sync command with SyncKey=0, and <Supported> </Supported> to indicate all elements to be ghosted

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
    <Sync xmlns="AirSync:">
      <Collections>
        <Collection>
          <SyncKey>0</SyncKey>
          <CollectionId>contacts:1</CollectionId>
          <Supported></Supported>
        </Collection>
      </Collections>
    </Sync>

    The WBXML for this is

    0301 6a00 455c 4f4b 0330 0001 5203 636f
    6e74 6163 7473 3a31 0001 2001 0101     

    Step2: We get 1st Sync response from server

    <?xml version="1.0"?>
    <!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
    <Sync xmlns="AirSync:">
      <Collections>
        <Collection>
          <SyncKey>1</SyncKey>
          <CollectionId>contacts:1</CollectionId>
          <Status>1</Status>
        </Collection>
      </Collections>
    </Sync>

    Step3: We send 2nd Sync with new SyncKey

    root@SpeedportW724V/Version 01011602:/tmp# cat tmp_as_Sync_req2_ac0.xml 
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
    <Sync xmlns="AirSync:">
      <Collections>
        <Collection>
          <SyncKey>1</SyncKey>
          <CollectionId>contacts:1</CollectionId>
        </Collection>
      </Collections>
    </Sync>

    The WBXML we send is:

     0301 6a00 455c 4f4b 0331 0001 5203 636f
     6e74 6163 7473 3a31 0001 0101 0100     

    Step4: We get  2nd Sync response from Server

    <?xml version="1.0"?>
    <!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
    <Sync xmlns="AirSync:">
      <Collections>
        <Collection>
          <SyncKey>2</SyncKey>
          <CollectionId>contacts:1</CollectionId>
          <Status>1</Status>
          <Commands>
            <Add>
              <ServerId>2621446859</ServerId>
              <ApplicationData>
                <Email1Address xmlns="Contacts:">kinghong66@gmail.com</Email1Address>
                <FileAs xmlns="Contacts:">chien,James</FileAs>
                <FirstName xmlns="Contacts:">James</FirstName>
                <HomePhoneNumber xmlns="Contacts:">28559625</HomePhoneNumber>
                <LastName xmlns="Contacts:">chien</LastName>
              </ApplicationData>
            </Add>
          </Commands>
        </Collection>
      </Collections>
    </Sync>

    The wbxml for this is

    0301 6a00 0000 455c 4f4b 0332 0001 5203
    636f 6e74 6163 7473 3a31 0001 4e03 3100
    0156 474d 0332 3632 3134 3436 3835 3900
    015d 0001 5b03 6b69 6e67 686f 6e67 3636
    4067 6d61 696c 2e63 6f6d 0001 5e03 6368
    6965 6e2c 4a61 6d65 7300 015f 034a 616d
    6573 0001 6703 3238 3535 3936 3235 0001
    6903 6368 6965 6e00 0101 0101 0101 0100

    Step5:  Now we Try to modify First name to James1234, send another Sync with Change commands,

    which is missing Email1Address

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
    <Sync xmlns="AirSync" xmlns:contacts="Contacts">
      <Collections>
        <Collection>
          <SyncKey>2</SyncKey>
          <CollectionId>contacts:1</CollectionId>
          <Commands>
            <Change>
              <ServerId>2621446859</ServerId>
              <ApplicationData>
                <contacts:LastName>chien</contacts:LastName>
                <contacts:FirstName>James1234</contacts:FirstName>
                <contacts:HomePhoneNumber>28559625</contacts:HomePhoneNumber>
              </ApplicationData>
            </Change>
          </Commands>
        </Collection>
      </Collections>
    </Sync>

    The wbxml for this request is:

    0301 6a00 455c 4f4b 0332 0001 5203 636f
    6e74 6163 7473 3a31 0001 5648 4d03 3236
    3231 3434 3638 3539 0001 5d00 0169 0363
    6869 656e 0001 5f03 4a61 6d65 7331 3233
    3400 0167 0332 3835 3539 3632 3500 0101
    0101 0101 0100                         

    Step6: We get response from server

    <?xml version="1.0"?>
    <!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
    <Sync xmlns="AirSync:">
      <Collections>
        <Collection>
          <SyncKey>3</SyncKey>
          <CollectionId>contacts:1</CollectionId>
          <Status>1</Status>
        </Collection>
      </Collections>
    </Sync>

    The WBXML format is

    0301 6a00 0000 455c 4f4b 0333 0001 5203
    636f 6e74 6163 7473 3a31 0001 4e03 3100
    0101 0101                              

    Step 7: Checking the database. I found the Email1Address have been deleted.

    Before:

    Contacts Field  

    First Name:  James  

    Last Name: Chien

    Email1Address: kinghong66@gmail.com

    HomePhoneNumber: 28559625

    After:

    Contacts Field  

    First Name:  James1234

    Last Name: Chien

    Email1Address: <Delete>

    HomePhoneNumber: 28559625

    Best Regards

    James

    Friday, July 18, 2014 11:12 AM
  • Hi James,

    >>PS: The failure case is run in our customer side EAS server,  ...

    I'm assuming that the "EAS server" you mention here (which is failing) is still Exchange 2007 SP1.  Is that a valid assumption?

    I don't know of a setting that would turn off ghosting but am still researching this.

    Thanks for your patience,

    Tom

    Friday, July 18, 2014 6:52 PM
    Moderator
  • Hi Tom,

              I confirm the EAS version run on customer side (failing case) is 12.1, but I am not sure if it is Exchange 2007SP1 or not, I will get this information and update later.  

              Again, thanks for looking into this issue.  

    Best Regards

    James

    Saturday, July 19, 2014 11:59 AM
  • Hi Tom,

         Below attached the HTTP OPTIONS response for the OK AND NG server.
    I observed the failure case Server : Mircosoft IIS/6.0 
    and the OK server in our Lab is Microsoft IIS/7.5


    [NG Server]

    Testing HTTP GET:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Testing HTTP OPTIONS:
    Allow:OPTIONS,POST
    MS-Server-ActiveSync:8.1
    MS-ASProtocolVersions:2.5,12.0,12.1
    MS-ASProtocolCommands:Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,Search,Settings,Ping,ItemOperations,Provision,ResolveRecipients,ValidateCert
    Public:OPTIONS,POST
    Content-Length:0
    Cache-Control:private
    Content-Type:text/plain; charset=iso-8859-1
    Date:Mon, 21 Jul 2014 02:10:40 GMT
    Server:Microsoft-IIS/6.0

    [OK Case ]  Our Lab

    Testing HTTP OPTIONS:
    Allow:OPTIONS,POST
    MS-Server-ActiveSync:8.1
    MS-ASProtocolVersions:1.0,2.0,2.1,2.5,12.0,12.1
    MS-ASProtocolCommands:Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,Search,Settings,Ping,ItemOperations,Provision,ResolveRecipients,ValidateCert
    Public:OPTIONS,POST
    Content-Length:0
    Cache-Control:private
    Date:Sun, 20 Jul 2014 18:22:57 GMT
    Server:Microsoft-IIS/7.5
    X-AspNet-Version:2.0.50727
    X-Powered-By:ASP.NET

    Status: PASS
    Monday, July 21, 2014 2:36 AM
  • Thanks James,

    I'll let you know what I find.

    Tom

    Monday, July 21, 2014 5:45 AM
    Moderator
  • Hi James,

    Thanks for your patience.  After doing some digging, I found that this was a known issue in v12.1 of the protocol and was fixed.  However, I suspect that your NG server is missing the update that contained the fix. Can you check to see if the failing server has:

    Update Rollup 9 for Exchange Server 2007 Service Pack 1 (KB970162)

    http://www.microsoft.com/downloads/details.aspx?FamilyID=55320be2-c65c-48bb-bab8-6335aa7d008c&displaylang=en

    ...installed?  This should contain the fix that addresses ghosted contact properties.

    If you're not sure about this, send me the complete Exchange version and build for the NG server and I can check whether you should have the correct support for these ghosted properties.

    Thanks,

    Tom

    • Marked as answer by james_chien Tuesday, August 5, 2014 1:40 AM
    Saturday, July 26, 2014 4:53 AM
    Moderator
  • Hi Tom,

           Thanks a lot for the support, I will try and let you know.

    Best Regards

    James

    Tuesday, July 29, 2014 3:09 AM
  • Hi Tom,

                I have marked your last reply as "answer" and I think this issue can close, thanks a lot for your support.

    Best Regards

    James

    Tuesday, August 5, 2014 1:41 AM
  • Thanks James, glad to help.

    Tom

    Tuesday, August 5, 2014 6:00 AM
    Moderator