1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Module 4: Mobility Sync/Push doc

64 297 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Module 4: Mobility Sync/Push Contents
Trường học Microsoft Corporation
Chuyên ngành Information Technology / Mobile Communication
Thể loại Documentation
Năm xuất bản 2002
Định dạng
Số trang 64
Dung lượng 1,23 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Exchange Mailbox Server Item Adds/Sec - The number of Exchange mailbox server item adds within the sync command processed per second by Exchange ActiveSync.. Exchange Mailbox Server Ite

Trang 1

Contents

Microsoft® Exchange Server 2003 Exchange ActiveSync® (EAS) 1

Sync Client Architecture 5

Object Management on the Device 7

Sync Protocol Versions and Device Support 8

Sync Protocol Negotiation 9

SSL 11

Sync Protocol Commands 13

Performance Counters 22

Synchronization and DAV Replication 28

Device Logging 30

Up to Date Notification 32

Administrative Tasks 33

Device Provisioning 38

Device Info XML 42

Lab 4.1: Configuring ActiveSync 46

Exercise 2 47

AUTD 48

OMA Sink 49

Batching of Notifications 51

Performance Counters 53

Known Issues 58

Lab 4.2: Setting Up AUTD 62

Module 4: Mobility Sync/Push

Trang 2

Last Saved: 7/18/2003 12:03 PM

domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place or event is intended or should be inferred Complying with all applicable copyright laws is the responsibility of the user Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property

 2002 Microsoft Corporation All rights reserved

Microsoft, MS-DOS, Windows, Windows NT, ActiveSync®, ActiveSync® 3.7, Microsoft® Exchange Server 2003, Microsoft® Mobile Services, Microsoft® Outlook® Mobile Access, Microsoft® Outlook® Web Access, Microsoft® Product Support Services, Microsoft® Server ActiveSync®, Microsoft® Small Business Server, Microsoft® Windows® Powered Pocket PC

2002, Microsoft® Windows® Powered Pocket PC 2002 Phone Edition, Microsoft® Windows® Powered Pocket PC 2003, Microsoft® Windows® Powered Smartphone, and MSN™ Internet Access are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries

The names of actual companies and products mentioned herein may be the trademarks of their respective owners

Trang 3

to as Microsoft® Server ActiveSync® or MSAS It has now been integrated with Exchange Server 2003

With MIS, devices running Microsoft® Windows® Powered Pocket PC 2002, Microsoft® Windows® Powered Pocket PC 2002 Phone Edition, and

Microsoft® Windows® Powered Smartphone had the Server ActiveSync client component installed and were supported

With Exchange ActiveSync, devices running Pocket PC 2002, Pocket Phone Edition and Smartphone are still supported In addition, Microsoft® Windows® Powered Pocket PC 2003 devices are supported Pocket PC 2003 devices allow more granularity in scheduling sync and also support the Always Up To Date functionality that is introduced in Exchange Server 2003

Overview

Trang 4

Last Saved: 7/18/2003 12:03 PM

Trang 5

Last Saved: 7/18/2003 12:03 PM

Enabling Users for Synchronization

All users are enabled by default The Exchange administrator can globally disable sync for all users This is configurable in Exchange System manager under Global Settings/Mobile Services

Enable user initiated synchronization - Selecting this checkbox allows users

to synchronize their Exchange information with their mobile device

Trang 6

Last Saved: 7/18/2003 12:03 PM

Enable up-to-date notifications - Selecting this checkbox allows users to

receive AUTD notifications in order to keep their mobile device up to date with information on their Exchange server

When the administrator changes the settings on this page, changes are written to the msExchOmaAdminWirelessEnable attribute on the Microsoft® Outlook®

Mobile Access (OMA) container in Global Settings This setting is also available on individual user objects

Users can be enabled/disabled on a per user basis through the Exchange

Features tab in AD Users and Computers

Files installed with Exchange ActiveSync

In Exchsrvr\bin folder:

„ Massync.dll - OMA Sync ISAPI extension DLL

„ Masperf.dll - OMA Sync Performance Counter DLL

„ MasPerf.ini - OMA Sync Performance Counter INI

„ Masperf.h - OMA Sync Performance Counter header

„ Exchsrvr\OMA\Sync is a blank folder so if someone tries to gain access to the sync folder, it is mapped to a folder that does not give access to all of the Exchange files

Trang 7

Last Saved: 7/18/2003 12:03 PM

Sync Client Architecture

The sync protocol is a request/response protocol built on a client/server communications model It is built on the HTTP protocol, using the HTTP POST request/response mechanism and the HTTP OPTIONS command The HTTP POST header specifies a protocol command and, if the command requires it, command data is sent in the HTTP POST body The data is usually formatted as compressed Wireless Binary XML (WBXML), which makes efficient use of the constrained bandwidth of mobile clients

The client initiates communication by posting a request When the server receives the request, it parses the request and then sends an HTTP POST response containing the requested data in its body

The sync protocol requires a TCP/IP connection between the client and server The underlying network layers, however, are implementation-specific Three common transport layers that support the protocol are GPRS, CDMA 1xRTT and IEEE 802.11 The sync protocol requires that any transmission errors be handled by the networking software, and that the protocol messages sent between the client and server be complete and error-free

The sync protocol is designed to enable any mobile client to efficiently synchronize PIM data with data stored on an Exchange server To achieve this, the client uses the sync protocol to talk to the Exchange front-end server component, which provides the synchronization engine as well as the means to retrieve data from the Exchange stores

Figure 1 shows the functional components of the client/server communications model used by the sync protocol

Trang 8

Last Saved: 7/18/2003 12:03 PM

Figure 1 Protocol communication between the client and server

The following steps occur for all commands the client sends to the server:

1 The client creates a request and sends it to the sync server as an HTTPS POST

2 The sync server processes the request, communicating with the Exchange back-end server to access the user’s PIM data

3 The sync server creates a response and sends it to the client as an HTTPS POST response

4 The client processes the response and, if necessary, updates the local PIM data

The following steps occur when the client sends a Sync command:

1 The client identifies any changes made to local PIM data since the last sync

2 The client creates a Sync command containing these changes

3 The client sends the command to the sync server as an HTTPS POST

4 The sync server identifies changes made to data on the server since the last sync, communicating with the Exchange back-end server to access the user’s data

5 The sync server resolves any conflicts between changes made to items on the client and on the server

6 The sync server creates a response containing server changes to be replicated on the client

7 The sync server sends the response as an HTTPS POST response

The client processes the response and updates the local PIM data

Trang 9

Last Saved: 7/18/2003 12:03 PM

Object Management on the Device

PIM data is stored in “collections” – one for contacts, one for calendar, and one for each e-mail folder The sync protocol supports syncing multiple e-mail folders For each collection, the client software stores a SyncKey, which contains 39-48 characters, 38 for the globally unique identifier (GUID), and 1-

10 for the incrementing number The client also stores a CollectionId, which is

a string around 40 characters for each folder as a unique identifier for the folder The client sends the SyncKey to the server with each sync request

Each object that is synced – message, contact or calendar item – has a unique identifier assigned by the server This ServerId is a 48-character string that is stored by the client The identifier is used during sync to identify objects that

are stored on both the client and server

Trang 10

Last Saved: 7/18/2003 12:03 PM

Sync Protocol Versions and Device Support

ActiveSync requires that the client and the server use the same protocol version

Mobile Information Server uses the AirSync Protocol v1.0 for ActiveSync

Exchange Server 2003 uses the new and improved AirSync protocol v2.0 for ActiveSync, but also supports AirSync protocol v1.0 for backward

compatibility

Mobile Information Server 2002 1.0

Pocket PC 2002 client uses AirSync protocol v1.0 for ActiveSync It can be used against MIS and Exchange Server 2003 using v1.0

Pocket PC 2003 client supports v1.0 and v2.0 protocols It can negotiate the

Mobile Information Server 2002 Pocket PC 2002 and Pocket PC 2003 Exchange Server 2003 Pocket PC 2002 and Pocket PC 2003

Trang 11

Last Saved: 7/18/2003 12:03 PM

Sync Protocol Negotiation

If a Pocket PC 2003 device is configured to connect to MIS, on the first sync, the device automatically configures the client to sync using v1 protocol If it is configured to connect to Exchange 2003 server, on the first sync, the device automatically configures the client to sync using v2 protocol

This protocol negotiation is done when

1 The device is cold booted

2 When the server name on the device is changed, a sync is attempted first If the server returns a Sync Key error, protocol negotiation is done

3 PIM information on the device is deleted The data types inbox, contacts and calendar are unselected thereby deleting PIM information on the device

4 When a MIS 2002 deployment has been upgraded to Exchange 2003 deployment

To optimize performance, this negotiation is only done if the client protocol version is not already set to the higher protocol version it can support The negotiation is done automatically There is no user interface (UI) to enable this During the negotiation, the client sends an OPTIONS command to the server The OPTIONS response from the server returns information about all the protocol versions it can support in a comma delimited format This information

is returned in the MS-ASProtocolVersions parameter

Trang 12

=-=-=-=

OPTIONS ActiveSync?User=vanithp&DeviceId=3DC1E291F008003188000050BF 325173&DeviceType=PocketPC

Microsoft-Server-Accept-Language: en-us -=-=-=- Start of Body -=-=-=-

=-=- [26/4/2003 23:45:59.0] -=-=

=-=-=-= Server Response =-=-=-

HTTP/1.1 200 OK Content-Length: 0 Date: Sat, 26 Apr 2003 23:45:58 GMT Server: Microsoft-IIS/6.0

MicrosoftOfficeWebServer: 5.0_Pub X-Powered-By: ASP.NET

Pragma: no-cache Public: OPTIONS, POST Allow: OPTIONS, POST MS-Server-ActiveSync: 2.0.3273.0

MS-ASProtocolVersions: 1.0,2.0

MS-ASProtocolCommands:

Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHier archy,CreateCollection,DeleteCollection,MoveCollection,Fold erSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,Get ItemEstimate,MeetingResponse,Notify

Trang 13

The Server ActiveSync client on Pocket PC 2002 also does certificate validation The following is a list of root certificates installed by default on PocketPC 2002 devices

„ Verisign/RSA Secure Server

„ Verisign Class 1 Public Primary certification authority (CA)

„ Verisign Class 2 Public Primary CA

„ Verisign Class 3 Public Primary CA

„ Verisign Class 3 Public Primary CA (2028)

„ GTE Cybertrust ROOT

„ GTE Cybertrust Solutions ROOT

„ Thawte Server CA

„ Thawte Premium Server CA

„ Entrust.net Secure Server

„ Entrust.net CA (2048 bit)

If you are using a certificate that is not signed by a CA listed above or not trusted on the PocketPC 2002, you can either use the Addrootcert utility to add your cert to the list of trusted root certificates or you can disable certificate validation on the device by using a CAB file provided on the Microsoft Mobile Information Server 2002 CD for PPC 2002 or certchk for PPC 2003 available in the Exchange 2003 Web Releases

PPC 2002

Trang 14

Last Saved: 7/18/2003 12:03 PM

See the readme that is provided with the CAB file for more information Using the CAB file does not remove the requirement for a certificate It simply disables certificate validation by changing a registry setting on the device

To do this manually, use a registry editor on the device and navigate to: HKEY_CURRENT_USER\Software\Microsoft\AirSync\Connection Choose New DWORD, type "Secure" for value name and 0 for value data

The Server ActiveSync client on a PocketPC 2003 does not require SSL There

is a checkbox on the client “This server uses secure connections (SSL)” to enable SSL It is highly recommended that SSL be used to secure

communications If SSL is not used, the user’s credentials are sent in clear text across the wire and this is clearly not a desirable option

Authentication in a Front End/Back End configuration

1 The device sends the credentials using basic authentication (over SSL if the option “This server uses secure connections (SSL) is checked to the front-end server The front end authenticates the user

2 Exchange ActiveSync queries the Active Directory to obtain the user’s display name, primary SMTP address and the Exchange server name

3 A Kerberos ticket is obtained from the Kerberos Distribution Center (KDC) and Exchange ActiveSync presents the ticket to the backend Exchange server

4 Information is retrieved from the back end and returned to the device

Pocket PC 2003

Trang 15

Last Saved: 7/18/2003 12:03 PM

Sync Protocol Commands

With Sync protocol v1.0, a typical sync session includes the following commands

Sync command had other commands embedded within it (Add, Change, etc) Sync protocol version 2.0 adds support for Folder sync and AUTD

Protocol commands are sent using the HTTP POST mechanism Some simple commands are contained entirely in the client request Universal Resource Indicator (URI), and more complex commands use the HTTP Body to convey further information about the command

A sync session may consist of multiple commands In this case, the session will

be made up of multiple pairs of command requests and responses sent back and forth between the client and server

There are three parts to a request:

URI The HTTP Universal Resource Indicator This part

includes the server address and several parameters, including the command name

HTTP Header Additional parameters used by the server are transmitted in standard HTTP format

Sync Command Format

Trang 16

Last Saved: 7/18/2003 12:03 PM

HTTP Body Data needed by the command The format varies

by command, and some commands have no body

The following example shows a typical sync request URI:

POST /Microsoft-Server-ActiveSync?User=johndoe&

DeviceId=789123456789012345&DeviceType=PocketPC&Cmd=Sync

The parameters such as Cmd, User, and DeviceId are sent by the client with each request The most important parameter is the Cmd parameter, which indicates to the server what operation it should perform In this example, the Sync argument passed in the Cmd parameter indicates to the server that a sync operation should be performed Additional data is contained in the HTTP POST body

In addition to the URI, the client also sends some general information in the HTTP Header The following example shows the entire HTTP POST request Header, along with the URI:

POST Microsoft-Server-ActiveSync?User=johndoe&

DeviceId=789123456789012345&DeviceType=PocketPC&Cmd=Sync Accept-Language: en-us

MS-ASProtocolVersion: 2.0 Content-Type: application/vnd.ms-sync.wbxml

The server responds with some general information in the Header The following entry contains the HTTP POST response Header:

HTTP/1.1 200 OK Content-Length: 114 Date: Sat, 26 Apr 2003 23:46:17 GMT Content-Type: application/vnd.ms-sync.wbxml Server: Microsoft-IIS/6.0

MicrosoftOfficeWebServer: 5.0_Pub X-Powered-By: ASP.NET

Pragma: no-cache MS-Server-ActiveSync: 2.0.3273.0

The request body contains data sent to the server The type and format of the data varies by command The most common format is XML, and the details depend on the command Commands that send e-mail messages use RFC 822 format rather than XML Some commands do not require extra data, so the body is empty

The response body contains data returned from the server As with the request body, the format varies by command Usually it is in WBXML format When the body contains an e-mail attachment, the format depends on the type of the attachment file Some commands do not use the body

URI

Header

Body

Trang 17

In the example sync response, the server indicates the success of the requested add, delete, and change operations and returns a list of its own adds, deletes, and changes It also notifies the client that there are more items remaining to be synchronized

Example Sync Request from the client

In this example, the client requests a sync for any changes made to contacts on the Exchange server, but requests that the response be limited to 100 items The client also gives commands to add, delete or modify three specified contacts Each contact is identified by a unique identifier (ServerId or ClientId)

For brevity, in this example, the data for particular instances of contacts is omitted (such as the contact name and phone number)

<Sync xmlns="AirSync:"> The Sync element indicates that this is a sync

A Collection is a set of objects (an e-mail folder, a

calendar, or a set of contacts) that can be synchronized

Class identifies the type of collection

SyncKey is used by the server to track sync state

It is used to detect when the client state and server state do not match

CollectionId identifies the particular collection

<GetChanges /> GetChanges tells the server to send updates in the

response for items that have changed on the Exchange server If this element is omitted, the sync will be one-way The server will receive the update from the client, but will not send its changes

back to the client GetChanges causes the server response to contain a Commands element for this

collection

<WindowSize>100</WindowSize>

In the WindowSize element, the client species the

maximum number of items the server should return

in its response

<Commands> The Commands section contains the sync

operations for this collection The server processes the operations and returns the results in the

Responses section of its response

Add creates a new contact on the server It is sent

when a new contact has been created on the client since the last sync

The ClientId is a unique identifier generated by the

client and is used to identify the new contact in the response from the server After synchronization, it

is replaced by a ServerId as the permanent identifier for the contact The ServerId is included in the response sent by the server to confirm the Add

Sync Command

Trang 18

Last Saved: 7/18/2003 12:03 PM

(see below)

The ApplicationData contains the contact itself

and details are omitted here It consists of XML data for the contact name, address, phone number, and so on

<Delete>

<ServerId>333333333</ServerId>

</Delete>

The Delete command asks the server to remove a

contact The contact is identified by its permanent

identifier, the ServerId

The Change command asks the server to change

an existing contact The contact is identified by its

permanent identifier, the ServerId

The ApplicationData section of a Change

command must contain all of the contact attributes, not just the ones that have been modified The

Change command replaces the existing contact on the server, acting like a Delete and an Add

</Commands>

</Collection>

</Collections>

</Sync>

Example Sync Response from the Server

The following example shows the response sent by the server

<Sync xmlns="AirSync:"> The top level Sync element in the

response is the same as in the request

The Collection information is the same

as in the corresponding request The

Class and CollectionId identify the collection The SyncKey is the same

value sent in the request and can be used by the client to verify that this response corresponds to the request in the previous example

The MoreAvailable element indicates

that there are additional changed items available from the server Because the

request had a WindowSize of 100, this

element indicates there were more than

100 changed items on the server

<Responses> The Responses section contains entries

corresponding to the Commands section

of the request, and there is one response for each command sent

<Change>

<ServerId>444444444</ServerId>

<Status>1</Status>

</Change>

This is the response to the Change

command sent to the server The changed object is identified by the

ServerId

The Status value of 1 indicates the

operation was successful Other values indicate errors

This is the response to the Add

command sent to the server

The ClientId matches the ClientId sent

with the original Add command from the client

The ServerId is a new permanent

identifier allocated by the server and must be stored by the client At this point,

Trang 19

Last Saved: 7/18/2003 12:03 PM

it’s up to the client to keep this mapping between the original ClientId and the new ServerId

The Status value of 1 indicates the

operation was successful

<Delete>

<ServerId>333333333</ServerId>

<Status>1</Status>

</Delete>

This is the response to the Delete

command sent to the server The contact being deleted is identified by the

ServerId, which matches the one sent in

the original command

The Status value of 1 indicates the

operation was successful

additional responses Because the WindowSize is 100, the

server sends 100 changes For brevity, this example shows only three

identified by a ServerId For an Add, this

is a new identifier and must be stored by the client along with the new contact For

Delete and Change, the identifier refers

to an existing contact For Add and Change, the ApplicationData contains

the new or changed contact Upon receiving this data, it is up to the client to update the local store to match the server

Synchronization Commands

GetItemEstimate Used by the client to get an estimate of the number of items that need to be

synchronized

Sync Synchronizes data between the client and server Data is included in the body

of the request and response

Folder Management Commands

GetHierarchy Gets the entire collection hierarchy The server response provides a list of all

non-hidden collections and their corresponding CollectionIds This is for v1 of the protocol

Trang 20

Last Saved: 7/18/2003 12:03 PM

FolderSync Syncs the collection hierarchy This command works similarly to the Sync

command The folder list has a SyncKey After the initial folder sync, subsequent folder hierarchy changes are sent from the server using Add and Delete commands This is for v2 of the protocol

CreateCollection Creates a collection on the server This command is used to create new e-mail

folders

DeleteCollection Deletes a folder from the server The CollectionId is passed to the server,

which deletes the collection with the matching identifier

MoveCollection Moves a folder from one location to another This command moves folders on

the server It is also used to rename a folder

MoveItems Moves items on the server from one collection to another For example, the

client can move a specific e-mail message to another e-mail folder

Messaging Commands

SendMail Used by clients to send MIME formatted e-mail messages to the server The

body of the request contains the message A command parameter provides the option of storing a copy of the message in the Sent Items folder

SmartReply This command is similar to SendMail, but the outgoing message consists of

the new message followed by the text of the original message The full original message is sent, even if only a truncated copy exists on the client Using the server copy of the original message saves network bandwidth by avoiding the need to download the original message and upload it with the reply The SmartReply command lists the message recipients, so it is used to implement both “reply” and “reply all” functionality

SmartForward This command is similar to SmartReply, but the original message is included

as an attachment to the outgoing message Any attachments contained in the original message are also forwarded

MeetingResponse This command is similar to SendMail and sends a meeting response message

accepting or declining a meeting request

GetAttachment This command downloads an e-mail attachment from the server Attachments

are not downloaded automatically with e-mail messages; they must be explicitly retrieved using this command

Notification Commands

Notify This command enables server notifications for one or more collections It also

provisions the device for notifications by telling the server the device’s address

Trang 21

Last Saved: 7/18/2003 12:03 PM

Sync protocol version 2.0 adds support for Folder sync With sync protocol v2.0, a FolderSync command is used instead of the GetHierarchy command The FolderSync command synchronizes the collection hierarchy in the same way as individual folders are synchronized

The folder hierarchy has a Sync Key associated with it The initial folder list is obtained by sending a SyncKey of zero Thereafter, individual folder changes are sent from the server Folder sync is one-way, meaning that the server sends changes to the client, but the client does not send changes to the server

During the initial sync, the user’s mailbox is traversed to retrieve the folder hierarchy Then an Exchange Search folder is created to cache the user’s hierarchy Subsequent FolderSync commands use the Search folder to retrieve the hierarchy In certain cases, the Search folder may take a while to get populated In these cases, a traversal is done until the Search folder gets populated The Exchange information store updates the Search folder

If the user is moved to another server, this search folder gets emptied out When sync encounters an empty Search folder, Search folder is deleted and recreated The SyncKey is not affected No changes are sent to the client unless there were any changes since the last sync

Folder sync is performed at the beginning of every sync session In order to get the hierarchy changes from the server, a PROPFIND is used to retrieve the folders, then a GET is used to retrieve the FolderSync state and finally a Search

is used to retrieve the information from the Search folder

The Search folder and the folder sync file are stored in the NON_IPM_SUBTREE of a user’s mailbox The user can get to these files by opening the NON_IPM_SUBTREE as a Web folder through Internet Explorer This is, however, not recommended

Folder Sync

Trang 22

Last Saved: 7/18/2003 12:03 PM

=-=-=-= Client Request =-=-=-=

POST ActiveSync?User=vanithp&DeviceId=3DC1E291F008003188000050BF325 173&DeviceType=PocketPC&Cmd=FolderSync

Microsoft-Server-Accept-Language: en-us MS-ASProtocolVersion: 2.0 Content-Type: application/vnd.ms-sync.wbxml -=-=-=- Start of Body -=-=-=-

<?xml version="1.0" encoding="utf-8"?><FolderSync xmlns="FolderHierarchy:"><SyncKey>0</SyncKey></FolderSync>

=-=- [26/4/2003 23:46:4.0] -=-=

=-=-=-= Server Response =-=-=- HTTP/1.1 200 OK

Content-Length: 9536 Date: Sat, 26 Apr 2003 23:46:02 GMT Content-Type: application/vnd.ms-sync.wbxml Server: Microsoft-IIS/6.0

MicrosoftOfficeWebServer: 5.0_Pub X-Powered-By: ASP.NET

Pragma: no-cache MS-Server-ActiveSync: 2.0.3272.0 -=-=-=- Start of Body -=-=-=-

<?xml version="1.0" encoding="utf-8"?><FolderSync xmlns="FolderHierarchy:"><Status>1</Status><SyncKey>{3DC36AA4- 33D1-4EA7-B53B-

361CD7540A4C}1</SyncKey><Changes><Count>105</Count><Add><Serve rId>027e696191c3e040bda137985b846d8a-

2305b9d</ParentId><DisplayName>provisioning</DisplayName><Type

150549</ServerId><ParentId>726a4c58dba56e409f3d3563a8bf953c->12</Type>………

The response from the server returns a list of folders The permanent URL of the folder (long ID) is included along with the display name This is used instead of the normal named URLs (/exchange/johndoe/inbox) because the end user could rename a folder or mail message

Each folder is associated with a type number

Trang 23

Last Saved: 7/18/2003 12:03 PM

Type Definition

1 User-created folder (generic)

2 Standard ‘Inbox’ folder

3 Standard ‘Drafts’ folder

4 Standard ‘Deleted Items’ folder

5 Standard ‘Sent Items’ folder

6 Standard ‘Outbox’ folder

7 Standard ‘Tasks’ folder

8 Standard ‘Calendar’ folder

9 Standard ‘Contacts’ folder

10 Standard ‘Notes’ folder

11 Standard ‘Journal’ folder

12 User-created mail folder

13 User-created calendar folder

14 User-created contacts folder

15 User-created tasks folder

16 User-created journal folder

17 User-created notes folder

18 Unknown folder type

In Version 1.0 of the protocol user-created mail folders had type value 1; in this version they have type value 12

The synchronization state is stored in a hidden folder in the user’s mailbox on the Exchange server The sync state for email, calendar and contacts and FolderSync is located in the Microsoft-Server-ActiveSync/PocketPC/DeviceId folder in the NON_IPM_SUBTREE of a user’s mailbox The Search folder containing the folder hierarchy is stored here as well

Exchange ActiveSync

Profile

Trang 24

Total Unrecognized Requests - The total number of unrecognized requests

received by Exchange ActiveSync

Sync Commands/Sec- The number of Sync commands processed per second

by Exchange ActiveSync

SendMail Commands/Sec - The number of SendMail commands processed

per second by Exchange ActiveSync The SendMail command is called when a user sends mail from the client

SmartForward Commands/Sec - The number of SmartForward commands

processed per second by Exchange ActiveSync The SmartForward command is called when a user forwards an existing mail item from the client

SmartReply Commands/Sec - The number of SmartReply commands

processed per second by Exchange ActiveSync The SmartReply command is called when a user replies to mail from the client

GetAttachment Commands/Sec - The number of GetAttachment commands

processed per second by Exchange ActiveSync The GetAttachment command

is called when a user retrieves a mail attachment from the client

GetHierarchy Commands/Sec - The number of GetHierarchy commands

processed per second by Exchange ActiveSync The GetHierarchy command is called when a user fetches their folder hierarchy

CreateCollection Commands/Sec - The number of CreateCollection

commands processed per second by Exchange ActiveSync The

Trang 25

Last Saved: 7/18/2003 12:03 PM

CreateCollection command is called when a user creates a folder from the client

DeleteCollection Commands/Sec - The number of DeleteCollection

commands processed per second by Exchange ActiveSync The DeleteCollection command is called when a user deletes a folder from the client

MoveCollection Commands/Sec - The number of MoveCollection commands

processed per second by Exchange ActiveSync The MoveCollection command

is called when a user moves a folder from the client

FolderSync Commands/Sec - The number of FolderSync commands

processed per second by Exchange ActiveSync The FolderSync command is called when a user synchronizes their folder hierarchy

FolderCreate Commands/Sec - The number of FolderCreate commands

processed per second by Exchange ActiveSync The FolderCreate command is called when a user creates a folder from the client

FolderDelete Commands/Sec - The number of FolderDelete commands

processed per second by Exchange ActiveSync The FolderDelete command is called when a user deletes a folder from the client

FolderUpdate Commands/Sec - The number of FolderUpdate commands

processed per second by Exchange ActiveSync The FolderUpdate command is called when a user moves/renames a folder from the client

MoveItems Commands/Sec - The number of MoveItems commands processed

per second by Exchange ActiveSync The MoveItem command is called when a user moves an item between folders from the client

GetItemEstimate Commands/Sec - The number of GetItemEstimate

commands processed per second by Exchange ActiveSync The GetItemEstimate command checks for the number of items that need to be synchronized

MeetingResponse Commands/Sec - The number of MeetingResponse

commands processed per second by Exchange ActiveSync The MeetingResponse command is called when a user responds to a meeting request from the client

Trang 26

Last Saved: 7/18/2003 12:03 PM

Notify Commands/Sec - The number of Notify commands processed per

second by Exchange ActiveSync The Notify command is called by the client to provision itself to receive notifications

Client Item Adds/Sec - The number of client item adds (within the sync

command) processed per second by Exchange ActiveSync

Client Item Changes/Sec - The number of client item changes (within the sync

command) processed per second by Exchange ActiveSync

Client Item Deletes/Sec - The number of client item deletes (within the sync

command) processed per second by Exchange ActiveSync

Client Item Fetches/Sec - The number of client item fetches (within the sync

command) processed per second by Exchange ActiveSync

Exchange Mailbox Server Item Adds/Sec - The number of Exchange mailbox

server item adds (within the sync command) processed per second by Exchange ActiveSync

Exchange Mailbox Server Item Changes/Sec - The number of Exchange

mailbox server item changes (within the sync command) processed per second

by Exchange ActiveSync

Exchange Mailbox Server Item Deletes/Sec - The number of Exchange

mailbox server item deletes (within the sync command) processed per second

by Exchange ActiveSync

Exchange Mailbox Server Item Soft Deletes/Sec - The number of Exchange

mailbox server item soft deletes processed per second by Exchange ActiveSync Soft deletes occur when items move out of filter range

Outstanding Exchange Mailbox Server Connection Requests - The number

of pending connection requests from Exchange ActiveSync to the Exchange mailbox server(s)

Outstanding Exchange Mailbox Server I/O Requests -The number of

pending input/output requests from Exchange ActiveSync to the Exchange mailbox server(s)

Trang 27

Last Saved: 7/18/2003 12:03 PM

Exchange Mailbox Server I/O Requests/Sec - The number of input/output

requests sent per second to the Exchange mailbox server(s) from Exchange ActiveSync

Total Users – The total number of users who have accessed Exchange

ActiveSync

Total Exchange Mailbox Server Sync Items - The total number of Exchange

mailbox server adds, changes, and deletes (within the sync command) sent to the client

Total SendMail Commands - The total number of SendMail commands

processed by Exchange ActiveSync The SendMail command is called when a user sends mail from the client

Total SmartForward Commands - The total number of SmartForward

commands processed by Exchange ActiveSync The SmartForward command is called when a user forwards an existing mail item from the client

Total SmartReply Commands - The total number of SmartReply commands

processed by Exchange ActiveSync The SmartReply command is called when

a user replies to mail from the client

Total GetAttachment Commands - The total number of GetAttachment

commands processed by Exchange ActiveSync The GetAttachment command

is called when a user retrieves a mail attachment from the client

Total GetHierarchy Commands - The total number of GetHierarchy

commands processed by Exchange ActiveSync The GetHierarchy command is called when a user fetches their folder hierarchy

Total CreateCollection Commands - The total number of CreateCollection

commands processed by Exchange ActiveSync The CreateCollection command is called when a user creates a folder from the client

Total DeleteCollection Commands - The total number of DeleteCollection

commands processed by Exchange ActiveSync The DeleteCollection command is called when a user deletes a folder from the client

Total MoveCollection Commands - The total number of MoveCollection

commands processed by Exchange ActiveSync The MoveCollection command

is called when a user moves a folder from the client

Trang 28

Last Saved: 7/18/2003 12:03 PM

Total FolderSync Commands - The total number of FolderSync commands

processed by Exchange ActiveSync The FolderSync command is called when a user synchronizes their folder hierarchy

Total FolderCreate Commands - The total number of FolderCreate

commands processed by Exchange ActiveSync The FolderCreate command is called when a user creates a folder from the client

Total FolderDelete Commands - The total number of FolderDelete commands

processed by Exchange ActiveSync The FolderDelete command is called when

a user deletes a folder from the client

Total FolderUpdate Commands - The total number of FolderUpdate

commands processed by Exchange ActiveSync The FolderUpdate command is called when a user moves/renames a folder from the client

Total MoveItems Commands - The total number of MoveItems commands

processed by Exchange ActiveSync The MoveItem command is called when a user moves an item between folders from the client

Total GetItemEstimate Commands - The total number of GetItemEstimate

commands processed by Exchange ActiveSync The GetItemEstimate command checks for the number of items that need to be synchronized

Total MeetingResponse Commands - The total number of MeetingResponse

commands processed by Exchange ActiveSync The MeetingResponse command is called when a user responds to a meeting request from the client

Total Notify Commands - The total number of Notify commands processed by

Exchange ActiveSync The Notify command is called by the client to provision itself to receive notifications

Total Client Item Adds - The total number of client item adds (within the sync

command) processed by Exchange ActiveSync

Total Client Item Changes - The total number of client item changes (within

the sync command) processed by Exchange ActiveSync

Total Client Item Deletes - The total number of client item deletes (within the

sync command) processed by Exchange ActiveSync

Trang 29

Last Saved: 7/18/2003 12:03 PM

Total Client Item Fetches - The total number of client item fetches (within the

sync command) processed by Exchange ActiveSync

Total Exchange Mailbox Server Item Adds- The total number of Exchange

mailbox server item adds (within the sync command) processed by Exchange ActiveSync

Total Exchange Mailbox Server Item Changes - The total number of

Exchange mailbox server item changes (within the sync command) processed

by Exchange ActiveSync

Total Exchange Mailbox Server Item Deletes - The total number of

Exchange mailbox server item deletes (within the sync command) processed by Exchange ActiveSync

Total Exchange Mailbox Server Item Soft Deletes - The total number of

Exchange mailbox server item soft deletes processed by Exchange ActiveSync Soft deletes occur when items move out of filter range

Total Sync Commands - The total number of Sync commands processed by

Exchange ActiveSync

Exchange Mailbox Server Sync Items/Sec - The number of Exchange

mailbox server adds, changes, deletes, and soft deletes (within the sync command) sent to the client per second by Exchange ActiveSync

Total Client Sync Items - The total number of client item adds, changes, and

deletes (within the sync command) sent from the client

Client Sync Items/Sec - The number of client item adds, changes, deletes, and

fetches (within the sync command) processed per second by Exchange ActiveSync

Trang 30

Last Saved: 7/18/2003 12:03 PM

Synchronization and DAV Replication

Synchronization or Replication in the Document Authoring and Versioning (DAV) context is the client-initiated process of fetching the manifest of a collection, downloading the changed resources from the server, and uploading the changed resources to the server

A set of methods, headers, and properties extend the HTTP and World Wide Web Document Authoring and Versioning (WebDAV) protocols to support replication of Web resources

For ex PROPFIND method is used to fetch the properties of an existing DAV resource PROPFIND method in DAV Replication context is used to download the property changes for a particular DAV resource

The Front End issues a normal PROPFIND or Search command and includes an additional XML element tree that requests the replication semantics This XML contains the client’s current CollBlob This CollBlob represents the current state of the client's data The server then returns the PROPFIND or Search results as normal except that it only returns items that the client does not already have the current version of, as well as information about how those items have changed

Every replicated resource has a resourcetag associated with it, which reflects the current state of that particular resource Every time a resource’s properties

or contents change, the resourcetag associated with that particular resource is updated

Definitions Resource

Trang 31

A manifest of a collection is the list of changes for a collection that is provided

by the server to the client The client obtains the manifest using the Search method

A CollBlob is an opaque binary stream generated by the server that represents the state of the contents of a collection CollBlob is an XML element

The CollBlob contains information about all the changes that the client has seen

in the collection’s contents and the query specified in the manifest request The CollBlob tracks only resources that match the search criteria specified as part of the query in the manifest request

The server returns the CollBlob data in the CollBlob XML element in response

to the client’s request for the manifest On the other hand, if the client has previously obtained a CollBlob for a collection, then the client includes the old

CollBlob in the CollBlob XML element as part of the manifest request for the

collection

A resourcetag is a token generated by the server that represents the current state

of a DAV resource (depth=0) The value of this property is a URI Every time a resource’s properties or contents change, the resourcetag associated with that particular resource is updated

A resourcetaglist is a container for the client to use to include the list of resourcetags when requesting the manifest of a collection from the server The repl is a XML Element that is a generic container for properties defined in the replication namespace http://schemas.microsoft.com/repl related to the resource

Trang 32

Last Saved: 7/18/2003 12:03 PM

Device Logging

Steps to enable logging on the device:

1 Click Start, ActiveSync, Tools, Options, Server, Advanced

2 Minimize the keyboard

3 Change the logging level to Brief or Verbose

4 Close the Options dialog

Setting the logging level to brief logs the headers whereas setting it to verbose logs sync requests and responses in addition to the headers The log is saved in text format in the Windows\ActiveSync folder, for example:

windows\ActiveSync\serverlog0

By default the log file gets cleared at the beginning of a sync session It is important to rename the file before you start another sync If you have configured automatic synchronization, it is especially important to rename this file to prevent it from being overwritten

With PocketPC 2003 devices, it is possible to specify the number of log files to generate before overwriting This can be specified through a registry key on the device

HKEY_CURRENT_USER\Software\Microsoft\AirSync\Logging The value for “Number of Logs” can be changed from the default of

1

Ngày đăng: 18/01/2014, 05:20