Get Exchange meetings from a C# web app

Jay Paterson 96 Reputation points
2021-07-07T02:35:40.647+00:00

I'm creating a one page C# web app that will be hosted in-house. The web form will query Exchange via EWS and return meetings for "today" from a specific users calendar.
I have found sample code in places but seem to be failing at the first step. Do I need to add a reference to a DLL or a service reference?
If so which DLL and if a service reference what would be the URL after ourmailserver.domain.com

I can't work on any code until I get the reference/using bit sorted.
Our Exchange web server is on premise and is already using EWS to provide calendar info to third party devices so is already open for business

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,461 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
522 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Glen Scales 4,431 Reputation points
    2021-07-12T23:52:07.083+00:00

    You should be using mailserver.ourdomain.com/ews/services.wsdl to create the proxy this is a bit old but may help https://learn.microsoft.com/en-us/previous-versions/office/developer/exchange-server-2010/bb408520(v=exchg.140). In the latest version of Visual studio you need to use the Advanced-Add Web Reference from the Add Service Reference dialogue.

    Instead of using the Proxy class you could also use the EWS Managed API from nuget https://www.nuget.org/packages/Microsoft.Exchange.WebServices/ which is a much easier object model to code with.

    0 comments No comments