Tag Archives: EWS Proxy

Feature comparison: EWS vs. EWS Managed API


Are you a .Net Developer who develop custom application using Exchange Web Services (EWS) Managed API or EWS (Auto-generated proxies)? Then this is for you. The EWS Managed API provides an intuitive interface for developing client applications that use EWS. The API enables unified access to Exchange resources, while using Outlook–compatible business logic. In short, you can use the EWS Managed API to access EWS in versions of Exchange starting with Exchange Server 2007 Service Pack 1 (SP1), including Exchange Online. However, do you know that not all features that are available in EWS are implemented in the EWS Managed API?

EWS vs EWS Managed API

You can refer the above snapshot or related documentation identifies the EWS Managed API feature implementations that target different versions of Exchange. If the EWS Managed API does not implement a feature that you want to use, you might consider an auto-generated proxy object model.

More articles on Exchange Client throttling…


To get more information on Client Throttling policies, you can refer the following articles:

General information about client throttling policies
More Throttling changes for Exchange Online
Exchange Online EWSMaxSubscriptions throttling budget calculation 
EWS Throttling in Exchange Online
Effects of Throttling on your Deployment in Exchange 2010 SP1
EWS best practices: Understand Throttling policies
Exchange Server 2010 – Client Throttling Policies

Exchange Server 2010: EWS applications that run on behalf of the user consume the same client throttling policy budget


An EWS application that runs on behalf of a user quickly consumes resources on the Microsoft Exchange server 2010. When we investigated, we noticed that the EWS operations the application performs exceed the limit that is set in the client throttling policies. As we know that the client throttling policies for Exchange Web Service are enabled in a Microsoft Exchange Server 2010 environment – all client throttling policies are enabled in Microsoft Exchange Server 2010 Service Pack 1 (SP1) or in Microsoft Exchange Server 2010 Service Pack 2 (SP2), by default. In this scenario, all the EWS applications that run on behalf of the user are throttled unexpectedly. The expected behavior is that only the EWS application whose operations exceed the limit that is set in the client throttling policies is restricted.

This issue occurs because all the EWS applications that run on behalf of the user consume the same client throttling policy budget. To resolve the problem, first make sure you installed the latest service pack & rollup for Exchange Server 2010 or install the Update Rollup 4 for Exchange Server 2010 Service Pack 2. You can refer: http://support.microsoft.com/kb/2706690

Exchange Developer: Exchange Web Services–Affinity and Throttling


In this session, Matt discusses about Exchange Web Services affinity and throttling…

https://channel9.msdn.com/Events/Open-Specifications-Plugfests/Windows-Identity-and-Exchange-Protocols-Plugfest-2012/Exchange-Web-Services-Affinity-and-Throttling/player?w=960&h=544

Enjoy & make use of it!!

Exchange Developer: Exchange Web Services – Best Practices (Part 2)


In Part 2, Matt discusses about searching, notifications, synchronization, and patterns when working with Exchange Web Services. The two part series would be good one for those who’re involved in building custom applications using Exchange development/Exchange Web Service.

https://channel9.msdn.com/Events/Open-Specifications-Plugfests/Windows-Identity-and-Exchange-Protocols-Plugfest-2012/Exchange-Web-Services-Best-Practices-Part-2/player?w=960&h=544

Enjoy!!

Exchange Developer: Exchange Web Services – Best Practices (Part 1)


Mid April, the Windows Server and Exchange Interoperability teams hosted an Open Specifications Plugfest event. The event was held in Redmond on the Microsoft campus for protocol developers implementing Exchange and Windows open specifications. I am planning to add couple of sessions related to Exchange and its developer…

In this session, my peer Matt Stehle (Sr. Consultant) provided guidance when you work with Exchange Web Services and mailbox data; he also covers reading, writing, searching, backup and restore.

https://channel9.msdn.com/Events/Open-Specifications-Plugfests/Windows-Identity-and-Exchange-Protocols-Plugfest-2012/Exchange-Web-Services-Best-Practices-Part-1/player?w=900&h=500

Enjoy!!

Developer Webcasts on Exchange Server 2010 programming


Please find the developer webcasts for Exchange Server 2010. If you’re planning to create your own custom application using Exchange Server 2010, i would recommend you to start from this.

I will try to add related info on the above shortly. Happy Coding!!

Availability Web Service Protocol Specification References


Information for the availability service is provided via our open specifications document: [MS-OXWAVLS].
Information for the security model used in the availability service, please reference the following document: [MS-OXCPERM].

For more info, you can refer:

Availability Web Services Protocol specification: http://msdn.microsoft.com/en-us/library/cc463891(v=exchg.80).aspx or http://download.microsoft.com/download/5/D/D/5DD33FDF-91F5-496D-9884-0A0B0EE698BB/[MS-OXWAVLS].pdf or http://download.microsoft.com/download/5/D/D/5DD33FDF-91F5-496D-9884-0A0B0EE698BB/Exchange_Protocols.zip.

EWS : How to access user’s free/busy info programmatically using Exchange Web Services (EWS)?


In this post, we will see how to access user free/busy information programmatically using Exchange Web Services (EWS) – Proxy. Exchange provides such a service by storing what is referred to as free/busy data. This information will indicate what requested time range is free, busy, and tentative for a particular user. It will also provide any out of office (oof) status as well. Free/Busy data can be obtained using the Availability service provided by the Exchange Server. This is simply a web service which obtains the free/busy data directly from a user’s calendar.

Specifically, the GetUserAvailability operation will provide the free/busy state at specific level of detail.Using GetUserAvailability operation, which provides current user availability information at a specified level of detail – about the availability of a set of users, rooms, and resources within a specified time period. Client applications such as Microsoft Office Outlook, Microsoft Outlook Web Access, Microsoft Outlook Mobile Access, and other applications use SMTP addresses to identify the requested user information.

Let start now by creating the binding, set the credentials/URL and pass the binding (esb) to the following functionality ( which I haven’t added here).

Identify the time to compare free/busy information:

Duration duration = new Duration();

duration.StartTime = DateTime.Now;

duration.EndTime = DateTime.Now.AddHours(4);


Identify the options for comparing free/busy information:

FreeBusyViewOptionsType fbViews = new FreeBusyViewOptionsType();

fbViews.TimeWindow = duration;

fbViews.RequestedView = FreeBusyViewType.MergedOnly;

fbViews.RequestedViewSpecified = true;

fbViews.MergedFreeBusyIntervalInMinutes = 35;

fbViews.MergedFreeBusyIntervalInMinutesSpecified = true;


Identify the user mailbox to review for free/busy data:
MailboxData[] mbx=
newMailboxData[1];

mbx[0] = new MailboxData();

EmailAddress emailAddress = new EmailAddress();

emailAddress.Address = "user1@domain.com";

emailAddress.Name = String.Empty;

mbx[0].Email = emailAddress;

mbx[0].ExcludeConflicts = false;

Make the request and set the time zone of the request:
getusrRequest.TimeZone = newSerializableTimeZone();

getusrRequest.TimeZone.Bias = 480;

getusrRequest.TimeZone.StandardTime = newSerializableTimeZoneTime();

getusrRequest.TimeZone.StandardTime.Bias = 0;

getusrRequest.TimeZone.StandardTime.DayOfWeek = DayOfWeekType.Sunday.ToString();

getusrRequest.TimeZone.StandardTime.DayOrder = 1;

getusrRequest.TimeZone.StandardTime.Month = 11;

getusrRequest.TimeZone.StandardTime.Time = "02:00:00";

getusrRequest.TimeZone.DaylightTime = new SerializableTimeZoneTime();

getusrRequest.TimeZone.DaylightTime.Bias = -60;

getusrRequest.TimeZone.DaylightTime.DayOfWeek = DayOfWeekType.Sunday.ToString();

getusrRequest.TimeZone.DaylightTime.DayOrder = 2;

getusrRequest.TimeZone.DaylightTime.Month = 3;

getusrRequest.TimeZone.DaylightTime.Time = "02:00:00";


In addition to that, add the mailbox and the view options to the request
getusrRequest.MailboxDataArray = mbx;

getusrRequest.FreeBusyViewOptions = fbViews;


Send the above request and get the response:
GetUserAvailabilityResponseType getusrResponse = esb.GetUserAvailability(getusrRequest);


Access the free/busy info:

if(getusrResponse.FreeBusyResponseArray.Length < 1)

{

Console.WriteLine("No free/busy response data available.");

}

else

{

foreach(FreeBusyResponseType fbrt in getusrResponse.FreeBusyResponseArray)

{

if(fbrt.ResponseMessage.ResponseClass == ResponseClassType.Error)

{

Console.WriteLine("Error:" + fbrt.ResponseMessage.MessageText);

}

else

{

FreeBusyView fbv = fbrt.FreeBusyView;

Console.WriteLine("Merged free/busy data: " + fbv.MergedFreeBusy);

}

}

}


If you run the above piece of code, then you will get the result:

clip_image001[17]

For more information, you can refer the following article: http://msdn.microsoft.com/en-us/library/aa564001(v=exchg.140).aspx

Happy programming!!