0

I am trying to get inbox folder informations using EWS.

 ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);**//Here Exchange2007_SP3 version not coming.Only(Exchange2007_SP1,Exchange2010,Exchange2010_SP1,Exchange2010_SP2) are available**
 service.Credentials = new WebCredentials(UserName, Password, DomainName);
 service.Url = new Uri("HTTPS://" + ServerName + "/EWS/Exchange.asmx");
 Folder rootfolder = Folder.Bind(service, WellKnownFolderName.Inbox);**//Error Arises**
 foreach (Folder folder in rootfolder.FindFolders(new FolderView(int.MaxValue)))
 {
 }

I am Getting Error : The Client Access Server version does not match the accessed resource's Mailbox Server version. Use AutoDiscover with the address of the resource being accessed to determine the correct URL to use to access the specified resource.

 If i use autodiscover service , For that to error arises.

 service.AutodiscoverUrl("adminuser@Domain.com",RedirectionUrlValidationCallback);

I am Getting Error : Autodiscover Service Could not be located.

user1891567
  • 681
  • 2
  • 10
  • 15

1 Answers1

0

It is necessary to set a dns register for Autodiscover. Maybe that is your problem.

autodiscover.emailsrvr.com.

Being emailsrvr.com the domain exchange in running on.

You have here some more information:

Setup a DNS record for Autodiscover

Carlos Landeras
  • 11,025
  • 11
  • 56
  • 82