Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I have written a windows service which keeps fetching details from a table TrnEmails and send mail to respective each To Email ID which is a column in that table.
I am using EWS to send the mail(asp.net c#).
This service has suddenly started throwing below exception. **In the log file,I also observed that the exception keeps repeating after 2 minutes.**
Exception details:
Exception message : Request failed. The operation has timed out
Inner Exception message : The operation has timed out
Exception Source : MailHandler.EWS
Exception Trace : at MailHandler.Interface.IMailItem.Send()
at NotificationService.NotificationService.OnElapsedTime(Object source, ElapsedEventArgs e)
Exception Target : Void MailHandler.Interface.IMailItem.Send()


As a result of this few mails are not reaching the end user. I went through this link http://stackoverflow.com/questions/14468822/exchange-web-services-streaming-subscription-timeout-when-opening-connection but no use.

Please help me out to resolve this issue.
Thanks in advance.
Posted
Comments
[no name] 24-Nov-14 10:16am    
Some code would be helpful. Please update your questions with further details.

1 solution

Hi,

Though I havent much used EWS, I found some points.

Firstly, what version of Exchange are you using ?

Secondly, you could use paging even if you query didn't timeout. Check this:
http://blogs.msdn.com/b/exchangedev/archive/2010/03/12/throttling-policies-and-the-ewsfindcountlimit.aspx[^]

If you implement paging and fiddle with optimal page size which will be under 1000 and also reduce the properties your retrieving down to those you actually using this should help solve the problem and increase the performance of your application.

The default timeout with the EWS Managed API is 90 seconds and is set on the ExchangeService Object. You can set this to a higher value e.g to set it to 5 minutes

If the server is busy for a time or any other environmental this can happen . I would suggest you check the EWS.Log on the Exchange server to see what happened at that time.


Regards,
Praneet
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900