I am using the below Microsoft exchange service url to call the mailbox in my asp.net (4.5) C# application.
https://outlook.office365.com/EWS/Exchange.asmx
The service and and its invocation is working fine while running from Visual Studio 2012.
But while hosting into IIS, I am getting the below error while service method invocation.
The remote server returned an error: (407) Proxy Authentication Required
I am using the below code to invoke service:
ExchangeService service = new
ExchangeService(ExchangeVersion.Exchange2010_SP1);
service.Credentials = new WebCredentials("praveen.vr@abc.com", "pwd", "dom");
service.UseDefaultCredentials = true;
Microsoft.Exchange.WebServices.Data.Folder rootFolder =
Microsoft.Exchange.WebServices.Data.Folder.Bind(service,
WellKnownFolderName.MsgFolderRoot);
rootFolder.Load();