Thursday, July 19, 2012

101 Exchange Code Examples (Think "One Boat Load of Exchange Web Services (EWS) Managed API samples for Exchange 2013")

Microsoft Developer Network - Samples - Exchange 2013 101 Code Samples

The code samples in the Exchange 2013: 101 code samples package show you how to use the Exchange Web Services (EWS) Managed API to send email messages, search mail folders, get contact information, check user availability, and more.

Prerequisites

These samples require the following:

  • A target server that is running Exchange Server 2007 Service Pack 1 (SP1) or a later version of Exchange.
  • The .NET Framework version 4.
  • The EWS Managed API assembly file, Microsoft.Exchange.WebServices.dll. You can download the assembly from the Microsoft Download Center.

Note: These samples assume that the assembly is in the default download directory. You will need to verify the path before you run the solution for an individual sample.

  • Visual Studio 2010 with the Visual Web Developer and C# components and an open Visual Studio 2010 solution.
    Or
  • A text editor to create and edit source code files and a command prompt window to run a .NET Framework command line compiler.

Key components of the sample

Each sample will typically contain the following files:

  • *.sln — A Visual Studio 2010 solution file for the project.
  • *.csproj — One or more Visual Studio 2010 project files.
  • app.config — Contains configuration data for the project.
  • *.cs —Contains the using statements, namespace, class, and functions to showcase a particular feature.
  • Authentication.csproj — The Visual Studio 2010 project file for the dependent authentication code.
  • TextFileTraceListener.cs — Contains the using statements, namespace, class, and code to write the XML request and response to a text file.
  • Service.cs — Contains the using statements, namespace, class, and functions necessary to acquire an ExchangeService object used in the project.
  • CertificateCallback.cs — Contains the using statements, namespace, class, and code to acquire an X509 certificate.
  • UserData.cs — Contains the using statements, namespace, class, and functions necessary to acquire user information required by the service object.

..."

Now this is a code sample set that's interesting, for me at least. Looks like a must go to resource if you're coding against, or thinking about coding against, the EWS's

image

You don't see 101? Many of these folders contain more than one sample...

image

No comments:

Post a Comment

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...