just started on a blank visual studio installation writing a new ews application.
Everything went fine, i tested it with an testmail ive sended from my new application an everything works great.
Next step should have been to retrieve two test-mails from my inbox via the "findItems" method, but when i'm trying this, i get always a timeout.
i dont understand it, because sending e-mails works but retrieving gives a timeout. does anybody can help out here?
thank you
this is the code i use right now:
{
static void Main(string[] args)
{
ExchangeService service = new ExchangeService();
service.Credentials = new WebCredentials("user", "password");
service.Url = new Uri("https://web.mydomain.com/EWS/Exchange.asmx");
if (service != null)
{
ItemView view = new ItemView(10);
view.PropertySet = new PropertySet(BasePropertySet.IdOnly, ItemSchema.Subject);
SearchFilter searchFilter = new SearchFilter.ContainsSubstring(ItemSchema.Subject, "test");
FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, searchFilter, view);
Console.WriteLine(findResults.TotalCount);
}
}
}```