Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MS Exchange server
Message
From
27/02/2020 03:45:39
 
 
To
27/02/2020 02:52:54
General information
Forum:
C#
Category:
Web Services
Miscellaneous
Thread ID:
01673210
Message ID:
01673228
Views:
57
If you were working against on-premise Exchange, you could view its logs and/or the Windows Application Event Log to see exactly why Exchange is shutting you down. I don't know if you can see any logs in O365 - maybe get the tenancy administrator to check. This is probably the quickest way to find out what's going on. If you can't access logs maybe you could open a support ticket with O365 and get them to check for you.

If you can't do that, you might look at configured Exchange limits e.g. maximum number of simultaneous connections, whether you're hitting any limits e.g. number of messages in a time period, if your account is subject to any quotas etc.

Is O365 Information Rights Management in use - are you being denied access to certain e-mails?

>Any ideas, please?
>
>
>Hi,
>
>I created one short application, which reads emails from MS Exchange, these emails move to another folder (MS Exch.server), then downloads and saves them to hdd as files .eml, and finish write to DB.
>it is started via a sch. task.
>
>
>Sometimes I get the following error:
>
>The request failed. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
>
>...
>
> ExchangeService _service;
>
> try
> {
> Console.WriteLine("Registering Exchange connection");
>
> _service = new ExchangeService
> {
> Credentials = new WebCredentials("username", "password")
> };
> }
> catch
> {
> Console.WriteLine("new ExchangeService failed. Press enter to exit:");
> return;
> }
>
> // office365 webservice URL
> _service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
>
> string fileName = lc_SaveAsFld + "NameOfLogFile.log";
>
> StringBuilder sb = new StringBuilder();
>
> Stopwatch stopwatch = new Stopwatch();
> stopwatch.Start();
>
> try
> {
>
> sb.Append("\r\n" + DateTime.Now.ToString("dd.MM.yyyy HH:mm:ss") + " ... " + "reading emails from Inbox " + "\r\n");
>
> // Read 100 mails
>
> int i = 0;
>
> foreach (EmailMessage email in _service.FindItems(WellKnownFolderName.Inbox, new ItemView(100)))
> {
>
> email.Load(new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.TextBody, ItemSchema.MimeContent));
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform