none
Was EWS support disabled for microsoft.com?

    Question

  • A week ago I wrote a basic client with EWS to access a domain user mailbox in the Redmond domain. Everything worked great. Now when I run my client I get the error:

    "The Autodiscover service could not be located."

    I also tried setting the service URL to: https://mail.microsoft.com/EWS/Exchange.asmx
    I  get the error:
    The Client Access server version doesn't match the Mailbox server version of the resource that was being accessed. To determine the correct URL to use to access the resource, use Autodiscover with the address of the resource.

    This leads me to wonder if the corp exchange servers were updated and EWS support lost in the process.


    Here is my code for auto discover:
                //Creating service binding for a Exchange Server 2007
                _service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
    
                _service.TraceEnabled = true;
                _service.TraceFlags = TraceFlags.All;
    
                //Assigning credentials for accessing the sender account
                _service.Credentials = new System.Net.NetworkCredential(user, pwd);
    
                //using autodiscover to find righ Exchange From End
                _service.AutodiscoverUrl(user+"@"+domain);


    Here is a trace when using AutoDiscover (I starred out my alias):
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:45:41 AM">Starting SCP lookup for domainName='microsoft.com', root path=
    '</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:45:48 AM">LDAP call failed, exception: System.Runtime.InteropServices.CO
    MException (0x8007054B): The specified domain either does not exist or could not
     be contacted.
    
       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_AdsObject()
       at System.DirectoryServices.PropertyValueCollection.PopulateList()
       at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entr
    y, String propertyName)
       at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
       at Microsoft.Exchange.WebServices.Autodiscover.DirectoryHelper.GetScpUrlList(
    String domainName, String ldapPath, Int32&amp; maxHops)
       at Microsoft.Exchange.WebServices.Autodiscover.DirectoryHelper.GetScpUrlList(
    String domainName)</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:45:48 AM">Trying to call Autodiscover for ******@microsoft.com on https
    ://microsoft.com/autodiscover/autodiscover.xml.</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverRequest" ThreadId="9" Timestamp="12/11/2009
    8:45:51 AM">
      <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outloo
    k/requestschema/2006">
        <Request>
          <EMailAddress>******@microsoft.com</EMailAddress>
          <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscov
    er/outlook/responseschema/2006a</AcceptableResponseSchema>
        </Request>
      </Autodiscover>
    </EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:45:51 AM"> failed: WebException (The underlying connection was closed: A
    n unexpected error occurred on a send.)</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:45:51 AM">Trying to call Autodiscover for ******@microsoft.com on https
    ://autodiscover.microsoft.com/autodiscover/autodiscover.xml.</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverRequest" ThreadId="9" Timestamp="12/11/2009
    8:45:51 AM">
      <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outloo
    k/requestschema/2006">
        <Request>
          <EMailAddress>******@microsoft.com</EMailAddress>
          <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscov
    er/outlook/responseschema/2006a</AcceptableResponseSchema>
        </Request>
      </Autodiscover>
    </EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverResponseHttpHeaders" ThreadId="9" Timestamp=
    "12/11/2009 8:45:51 AM">500 Internal Server Error
    Connection: close
    Content-Length: 6347
    Cache-Control: private
    Content-Type: text/html; charset=utf-8
    Date: Fri, 11 Dec 2009 16:45:54 GMT
    Server: Microsoft-IIS/7.5
    X-Powered-By: ASP.NET
    
    </EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:45:51 AM"> failed: WebException (The remote server returned an error: (5
    00) Internal Server Error.)</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:45:51 AM">Trying to get Autodiscover redirection URL from http://autodis
    cover.microsoft.com/autodiscover/autodiscover.xml.</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:46:12 AM">No Autodiscover redirection URL was returned.</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:46:12 AM">Trying to get Autodiscover host from DNS SRV record for micros
    oft.com.</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:46:12 AM">DnsQuery returned error error 'DNS name does not exist' error
    code 0x0000232B.</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:46:12 AM">No appropriate SRV record was found.</EwsLogEntry>
    <EwsLogEntry EntryKind="AutodiscoverConfiguration" ThreadId="9" Timestamp="12/11
    /2009 8:46:12 AM">No matching Autodiscover DNS SRV records were found.</EwsLogEn
    try>
    

    Any ideas? I also tried using the EWS Editor and it had the same issues as my code. Is anyone else able to use the EWS Editor to connect to their corpnet email?

    Thank you,
    Gary
    Friday, December 11, 2009 7:23 PM

All replies

  • Well AutoDiscovery still seems to be broken but I figured out the EWS endpoint is:
    https://owa.microsoft.com/ews/exchange.asmx

    So at least I am unblocked.
    Saturday, December 12, 2009 11:46 PM