Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Setting Active Sync settings from code (C#)

46 views
Skip to first unread message

patrik...@home.se

unread,
Oct 1, 2007, 3:11:35 AM10/1/07
to
Hi, I need to be able to set upp a phone (both Windows Mobile 6 &
Windows Mobile 6 Professional) with specific settings for Active Sync.
I need to do this with C#.
The settings I need to set are:
Exchange server
Domain
SSL-connection
Scheduling of sync (both setting up times and sync interavalls)
SyncWhenRoaming (Found this in a good place in registry)
Which parts to sync:contacts, agenda (timespann), mail (timespann,
messageformat, size), tasks

I know some of these things are in the registry but have maybe
different keys on different phones, i need a good way of doing
this...Is it possible to connect to an activesync-object to set these
things...???

regards
Patrik Loren

Peter Foot [MVP]

unread,
Oct 1, 2007, 7:03:33 AM10/1/07
to
You need to use the Sync service provider:-
http://msdn2.microsoft.com/en-us/library/aa455976.aspx

From managed code you would use ConfigurationManager.ProcessConfiguration
with an XML document containing the settings. The link above describes the
service provider and has a few examples.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility

<patrik...@home.se> wrote in message
news:1191222695.3...@y42g2000hsy.googlegroups.com...

patrik.loren

unread,
Oct 4, 2007, 5:20:56 AM10/4/07
to
Hi Peter! Thank's for the link!

I've looked into these xml-configurations... Having some
securityproblems I guess...
After I've run the .cpf I get an sms telling me that is failed and not
authorized...

Should i use registry enries for some to reduse risk of security
issues...
The xml I try to config with is this:
<wap-provisioningdoc>
<characteristic type="Sync">
<characteristic type="Calender">
<parm name="CalenderAgeFilter" value="4"/>
<parm name="Enabled" value="1"/>
</characteristic>
<characteristic type="Connection">
<parm name="AllowSSLOption" value="0"/>
<parm name="Domain" value="eur.corp.vattenfall.com"/>
<parm name="Server" value="sync.vattenfall.de"/>
</characteristic>
<characteristic type="Contacts">
<parm name="Enabled" value="1"/>
</characteristic>
<characteristic type="Mail">
<parm name="EmalAgeFilter" value="4"/>
<parm name="Enabled" value="1"/>
<parm name="MailBodyTruncation" value="2048"/>
<parm name="MailFileAttachments" value="0"/>
</characteristic>
<characteristic type="Settings">
<parm name="OffPeakFrequency" value="0"/>
<parm name="PeakStartTime" value="08:00"/>
<parm name="PeakEndTime" value="17:00"/>
<parm name="PeakFrequency" value="60"/>
<characteristic type="PeakDays">
<parm name="Sun" value="0"/>
<parm name="Mon" value="1"/>
<parm name="Tue" value="1"/>
<parm name="Wed" value="1"/>
<parm name="Thr" value="1"/>
<parm name="Fri" value="1"/>
<parm name="Sat" value="0"/>
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>

/Patrik

0 new messages