Forum Discussion
FindFolders specific value has invalid HTTP Header Characters
Hi, I recently started hitting a bug, and any suggestions on how to work around this would be greatly appreciated.
var ewsClient = new ExchangeService();
ewsClient.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
ewsClient.Credentials = new OAuthCredentials(authResult.AccessToken);
ewsClient.ImpersonatedUserId =
new ImpersonatedUserId(ConnectingIdType.SmtpAddress, mailbox);
//Include x-anchormailbox header
ewsClient.HttpHeaders.Add("X-AnchorMailbox", mailbox);
var folders = ewsClient.FindFolders(WellKnownFolderName.Inbox, new FolderView(10));
This last line throws an error:
Specified value has invalid HTTP Header characters.
Parameter name: name
https://learn.microsoft.com/en-us/users/na/?userid=e0f12310-8548-4c60-8e6a-da93554fb541
1 Reply
- RemedServicesCopper ContributorI would like to add, while there were no changes to code when this bug started to surface, I do believe there was a new subfolder created in the Inbox.