I am new to EWS. I created a C# application which syncs contacts from a database to Exchange using EWS Managed API. This app works great on PCs which are connected to our physical network/domain. Now, I am trying to make it work for remote PCs (which are not directly connected to the domain). The AutoDiscover call returns an error "The expected XML node type was XmlDeclaration, but the actual type is Element."
Here is my code
private ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1); try { service.Credentials = new NetworkCredential("test.user", "password", "mycomp.com"); service.AutodiscoverUrl("test.user@mycomp.com", RedirectionCallback); } catch (System.Exception e) { sErr = e.Message; }I have also tried using WebCredentials but I get the same error. Fiddler does not give my any useful information. Any idea what I am doing wrong? Your help is greatly appreciated.
Thanks.
Vishnu