Exchange Server 2013 EMail Driver

I have a C# program that connects to my Exchange Server 2010 and is able to read every email.

I am using the microsoft.exchange.webservices.dll library.

The problem is, that this program gives back the following exception on Exchange Server 2013: "The remote server returned an error: (501) Not Implemented."

I have no idea what's the difference between these 2 servers.

Some Code Snippets:

ExchangeVersion version = ExchangeVersion.Exchange2013; ExchangeService service = new ExchangeService(version); service.Credentials = new NetworkCredential("user", "pw", "domain"); service.AutodiscoverUrl("emailaddr");

and here happens the exception:

SearchFilter sf = new SearchFilter.SearchFilterCollection(LogicalOperator.And, new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false));

FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, sf, new ItemView(20));

service.LoadPropertiesForItems(findResults.Items, PropertySet.FirstClassProperties);

string mailsender = item.LastModifiedName;



  • Edited by Danielb95 Tuesday, May 26, 2015 9:34 AM
  • Moved by jim-xuModerator Wednesday, May 27, 2015 2:26 AM Exchange Development
May 26th, 2015 9:32am

It's the same problem with the EWSEditor.

It shows me all the data of the Exchange Server but when I want to open a message folder, he throws the 501 exception.

Edit: I just noticed, that I can enter the inbox with EWSEditor, it actually shows me the inbox, but the error 501 is still coming.

Edit2: Just tried to create mails in the draft folder. It works. How can this be possible? I can create mails on the server, but I can't read the inbox? (Still get the error though) 

  • Edited by Danielb95 Wednesday, May 27, 2015 8:02 AM
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 6:57am

Wow, you actually gave me the final hint.

When I go to the Fiddler Options -> HTTPS and activate "Decrypt HTTPS traffic" it works without any problems. When i close fiddler, the error returns.

So how could I handle that?

May 28th, 2015 4:35am

Fiddler is just acting a proxy in this instance it sounds like you have something else on the Machine where your running the code that is affecting it or potentially its injecting something into request or your submitting a trace verb https://support.microsoft.com/en-us/kb/942058

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
May 28th, 2015 6:46am

Tried the instructions of your link. Didn't change anything.

How could i detect the program, that's affecting my Driver?

Or is there a possibility to edit my code so, that it decrypts the HTTPS traffic itself?


  • Edited by Danielb95 19 hours 53 minutes ago
May 28th, 2015 7:32am

Tried the instructions of your link. Didn't change anything.

How could i detect the program, that's affecting my Driver?

Or is there a possibility to edit my code so, that it decrypts the HTTPS traffic itself?


  • Edited by Danielb95 Thursday, May 28, 2015 11:35 AM
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2015 11:29am

I'd probably look at using a lower level data capture using NetMon and EWS Parsers see http://channel9.msdn.com/Events/Open-Specifications-Plugfests/Windows-Identity-and-Exchange-Protocols-Plugfest-2012/Exchange-Web-Services-Network-Monitor-Parsers

Cheers
Glen

May 29th, 2015 12:22am

I tried to use the FiddlerCore Library.

Would this be an option too?

Free Windows Admin Tool Kit Click here and download it now
May 29th, 2015 2:04am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics