When Autodiscover fails, how to differentiate

Hello.

I am trying to build a robust logic around autodsicvoer. It can fail for 3 reasons:

1) the credentials are wrong

2) the exchange server is not set up to support it

3) network error.

Is there a way to differentiate between the 3 cases using the c# api?

Looking at the code, it only throws a ServiceRemoteException when things go wrong...

Thanks, 

 Erez

March 24th, 2015 5:54am

No, there really isn't. The managed API encapsulates all of the Autodiscover attempts to different servers and only returns to the caller a general exception. You can enable tracing and get the information in a log file, but it sounds like you want your app to react to the different scenarios at runtime, which the general exception doesn't provide enough information to do.
Free Windows Admin Tool Kit Click here and download it now
March 24th, 2015 9:23am

Is there a way to authenticate the username/password without a URL ?

That way, if the autodiscover fails, I can prompt the user to figure out the url ,instead of re-asking "check username and password" which would be inappropriate.

March 25th, 2015 12:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics