[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How do I colaborate with Exchange though c#?

Posted on 2011-03-02
3
Medium Priority
?
363 Views
Last Modified: 2013-12-17
I want to be able to connect to some exchange account and add/remove given appointments. What do I use to do that? I found some solutions using CDOEX Library but it seems like it's  no longer supported with 2010.
0
Comment
Question by:joein610
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:pchui
ID: 35024155
If you are writing a server application, your best best is use the Exchange Web Services. EWS is intended to replace a myriad of partial Exchange APIs (CDO, CDOEX, ExOLEDB, WebDav, Exchange store event sinks). Even most MAPI tasks can be replaced with EWS.

Microsoft has created managed code wrappers to make EWS easier to work with:
http://msdn.microsoft.com/en-us/library/dd633709(v=exchg.80).aspx

Here's some sample code for creating appointments with the EWS managed API:
http://msdn.microsoft.com/en-us/library/dd633661(v=exchg.80).aspx

If you're writing a client application, then there's still the Outlook Object Model.
0
 

Author Comment

by:joein610
ID: 35028759
I managed to install Exchange API but I get some errors:

using System;
using System.Net;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Exchange.WebServices.Data;
namespace ClassLibrary1
{
    public class Class1
    {
        ExchangeService service = new ExchangeService();
        service.UseDefaultCredentials = true;
        service.Credentials = new WebCredentials("user1@contoso.com", "password");



    }
}



3-3-2011-11-26-19-AM.png
0
 
LVL 2

Accepted Solution

by:
pchui earned 2000 total points
ID: 35029397
You forgot to put your statments in a function

using System;
using System.Net;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Exchange.WebServices.Data;
namespace ClassLibrary1
{
    public class Class1
    {
        void foo()
        {
            ExchangeService service = new ExchangeService();
            service.UseDefaultCredentials = true;
            service.Credentials = new WebCredentials("user1@contoso.com", "password");
        }
    }
}

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question