none
Getting 404 errors doing the most basic thing with EWS RRS feed

  • Question

  • Very new to using EWS;

    I have verified that if I go to https://myserver.com/EWS/Services.asmx and log in using the supplied creditials I can access the WSDL.

    I'm sure this is a very basic problem.  It's a new Exchange 2010 install.

     

                var userName = "Automation@mycorp.com";
                var password = "AutomationPassword";
                var url = "https://myserver.com/EWS/Services.asmx";

                try
                {
                    var responseMessages = new List<Item>();
                    var service = new ExchangeService();
                    service.Credentials = new NetworkCredential(userName, password);
                    //service.AutodiscoverUrl(userName);
                    service.Url = new Uri(url);

                    var offset = 0;
                    const int pageSize = 100;

                    FindItemsResults<Item> result;
                    var filter = new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false);

                    do
                    {
                        var view = new ItemView(pageSize, offset);

                        result = service.FindItems(WellKnownFolderName.Inbox, filter, view);
                        responseMessages.AddRange(result);
                        offset += pageSize;

                    } while (result.MoreAvailable);
                }
                catch (Exception ex)
                {
                    LogException(methodName, ex);
                    throw;
                }

    Thursday, August 4, 2011 12:59 AM

Answers

All replies