How do i check if a exchange connection is valid? (via ews)
I need a way to figure out if an via user input configured exchange connect开发者_如何学Cion is valid. I use ews.
Use Autodiscovery if its available.
If you know the url, check the web service exists by creating a HttpWebRequest with the EWS URL and use HTTPWebResponse to check that the status of the response is valid.
If you want to test an actual web service call on a mailbox, you could try finding the root folder using the GetFolderType call.
精彩评论