Exchange ActiveSync Building Blocks – Autodiscover

Index for the series:
Exchange ActiveSync Building Blocks – Intro

Background reading (not a pre-requisite):
EAS MD 1.4 – Autodiscover Support – Autodiscover for ActiveSync Developers
[MS-ASCMD] -ActiveSync Command Reference – Autodiscover

So, enough with the excuses. Give us something we can compile, that we can use in an actual ActiveSync client, that is relevant – just something already.

Where to start with a topic like the Exchange ActiveSync protocol? I decided that although it’s kind of in reverse order if you use my EAS MD utility as the yardstick, I wanted to cover the last feature I implemented first in this series Smile (Hey, that means I might still have the code fresh in mind, right?)

There is a reason I do it in this order. When building my tool Autodiscover wasn’t initially on top of the list of issues I had when testing and verifying Exchange Server ActiveSync setups. (I think figuring out the provisioning process was on top of my list actually.)

But at the same time – when you configure an ActiveSync client one of the first things you have to be aware is the address to your Exchange Server. While this is not a big problem to solve by manually typing in the address it does feel smoother just typing your email address accompanied by your password and have the device figure out the rest of it. And while most IT pros will be able to figure out the address to the Exchange Server, (unless your Exchange admin is refusing to let you in on it), many end-users have no idea what Exchange even means. They usually have a clue as to what their email address might be though, so that might be a good starting point on their quest to get mail and “stuff” on their devices.

As it turns out it’s also one of the easier parts of the protocol to get started with, as you don’t have to concern yourself with WBXML and such. I’ve previously explained how Autodiscover works in general, so read up on that if you’re a bit unsure as to what we’re talking about here. (Link on top of this post.)

Read more

Exchange ActiveSync Building Blocks–Warming Up

Index for this series of posts can be found here:

Exchange ActiveSync Building Blocks – Intro

Following up on last week’s premise of delivering some Exchange ActiveSync protocol hacking I thought I’d get it semi-started with covering code common to later articles.

My language of choice will as stated be C#. I know you can do this stuff in Java, PHP, and whatnot, but I had to make a decision as to what I would be using and C# felt natural. I will be writing code compatible with .NET 3.5 unless something else is indicated. (For instance if I run into a feature which requires .NET 4.0.)

You can assume I have included the following .NET classes in the code:

using System;
using System.Windows.Forms;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;

Skip System.Windows.Forms if your hacking it from a console app.

Read more

Exchange ActiveSync Building Blocks – Intro

I mentioned when petitioning for feature requests for EAS-MD that I was considering open-sourcing this utility in some form. I haven’t decided on all the details there yet, but I am sort of starting it off now with a series of posts describing, (along with code), the ActiveSync features I’m using in my utility in further details. While having code readily available is a good thing I believe explanations and samples are perfect complements if the object is to learn. Learning by doing is great, but learning by trial-and-error not necessarily equally so. (Sometimes we don’t care how things work, and just want a pre-built black-box component, but that isn’t my primary intent with this site. And besides – you can just use my “official” app for troubleshooting your ActiveSync deployment if you do not need to understand all this stuff. I do understand that most people aren’t that into ActiveSync Smile )

This is the introductory post, which will serve to answer some general questions as well as being updated with links to new posts as they appear.
Part 0 – Warming Up
Part 1 – Autodiscover
Part 2 – First Sync
Part 3 – Error Handling
Part 4 – AS-WBXML
Part 5 – Provisioning
Part 6 – Remote Wipe
Part 7 – DocumentLibrary
Part 8 – WBXML Encode and Decode
Part 9 – GAL Search
Read more