3

I'm new to using the Exchange 2010 API (C#). I'm just going through a basic example (link below), but I'm having issues when using the FindItems method. In particular, I get the error "ServiceVersionException unhandled". The first thing that comes to mind is that I've specified the wrong Exchange version, like in this line:

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);

I've tried the different permutations though (and the IT guys tell me its 2010), and still getting the same error. I was wondering if it could be some weird firewall thing, or something else.

Any thoughts are much appreciated!

Thanks

Example: http://omegacoder.com/?p=454

EDIT: The inner exception is: "null".

keynesiancross
  • 3,441
  • 15
  • 47
  • 87
  • What if you don't specify a specific version? There are only 3 versions (Exchange2007_SP1, Exchange2010, & Exchange2010_SP1). Maybe SP1 isn't applied. – SliverNinja - MSFT Nov 22 '11 at 19:23
  • I did try without the SP1 like below, but still didn't work... ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010); – keynesiancross Nov 22 '11 at 19:25
  • see Edit above for inner exception – keynesiancross Nov 22 '11 at 19:47
  • @keynesiancross you should try it like this: [ExchangeService service = new ExchangeService();](http://msdn.microsoft.com/en-us/library/dd634740%28v=EXCHG.80%29.aspx). Are you using [Auto Discovery](http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.exchangeservice.autodiscoverurl%28v=exchg.80%29.aspx)? – SliverNinja - MSFT Nov 22 '11 at 20:09
  • I am using Auto Discovery. Tried that line above there, where I don't specify a version, but it still gives the same error. – keynesiancross Nov 22 '11 at 20:11

0 Answers0