This project is read-only.

Exceptions

Jan 31, 2015 at 5:26 PM
Hi,

I have create new mail in Office365 (noammaoz@outlook.com) and to create New Exchange Service in your application.
I getting 2 types of exceptions:
  1. The expected XML node type was XmlDeclaration, but the actual type is Element
    Selected: Autodiscover Email: noammaoz@outlook.com EMS Schema Version: null
    Credentials: username: noammaoz@outlook.com password: *****
    Impersonation: ID Type: SmtpAddress ID: noammaoz@outlook.com
  2. The request failed. The remote server returned an error: (401) Unauthorized
    Selected: Service URL: https://outlook.office365.com/EWS/Exchange.asmx
    EMS Schema Version: null
    Credentials: username: noammaoz@outlook.com password: *****
    Impersonation: ID Type: SmtpAddress ID: noammaoz@outlook.com
Can you please help me with this?

Regards,

Noam
Coordinator
Apr 20, 2015 at 2:35 PM
  • Be sure to properly XML encode anything you put in the XML body Refer to the XML RFCs on the web for how to do this. You could also send an email using EWSEditor's mail window - right click on the inbox and select new, then after sending see what was sent to Exchange by looking at EWSEditor's logs.
Be sure to have RBAC permissions setup when using EWS Impersonation - this needs to be done by an admin. You should always set the EWS Schema version. Check permissions with https://testconnectivity.microsoft.com/.