How to get microsoft exchange server hostname, when I have only username

0 votes
asked Apr 6 by Praneeth (140 points)
edited Apr 6 by Praneeth

Use of 'ExchangeService' object from Microsoft.Exchange.WebServices is quiet comfortable to connect to exchange mailbox , where settings of the mail server are exposed using AutoDiscover Server.
In Rebex EWS object need to connect need to provide 'hostname'(min requirement). When I give hostname from email Id (user@hostname(.com) ) to connect I get 'Rebex.Net.NetworkSessionExceptionStatus.ServerProtocolViolation' exception with message "SOAP response expected" .

Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Apr 6 by Lukas Pokorny (92,750 points)

Unfortunately, auto-discovery is not supported yet, although we have been considering adding support for it.

In the meantime, the recommended solution is to retrieve and parse autodiscover.xml in custom code according to Autodiscover web service reference.

...