none
Accessing Exchange using EWS Managed API behind proxy gives error.

    Question

  • I'm getting error while using EWS Managed API when connecting behind proxy only, the code is given belown:

                ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
                System.Net.ServicePointManager.ServerCertificateValidationCallback =
                delegate(
                            Object obj,
                            X509Certificate certificate,
                            X509Chain chain,
                            SslPolicyErrors errors)
                {
                    return true;
                };
                service.Credentials = new WebCredentials("USERID", "PASSWORD", "DOMAIN") ;
                service.Url = new Uri(@"https://ExchangeServer/EWS/Exchange.asmx");
               Folder inbox = Folder.Bind(service, WellKnownFolderName.Inbox);
    If I will disable proxy it will work fine. My email account and the windows domain account are not same and on differenct domain. If anybody can help setting the proxy for ExchangeService object so I can get ride of this error.
    Wednesday, January 27, 2010 8:49 AM

Answers

  • There is currently no way to set the proxy on a per-ExchangeService instance basis. You can however change the proxy used by your application (including ExchangeService) via the WebRequest.DefaultWebProxy property.
    David Claux | Program Manager - Exchange Web Services
    Wednesday, January 27, 2010 4:30 PM

All replies

  • There is currently no way to set the proxy on a per-ExchangeService instance basis. You can however change the proxy used by your application (including ExchangeService) via the WebRequest.DefaultWebProxy property.
    David Claux | Program Manager - Exchange Web Services
    Wednesday, January 27, 2010 4:30 PM
  • David  Thanks you very much for your reply I'll try that.
    Wednesday, February 03, 2010 10:15 AM