locked
Office 365 EWS url not working RRS feed

  • Question

  • Hi ,

    I have created a trial Office365 account (exchange online) for testing my application. From the outlook client, I have found the EWS url of that account 'https://outlook.office365.com/ews/exchange.asmx'.

    I am trying to add web reference of this EWS url in my .Net console application, it is throwing an error as below.

    "There was an error downloading 'https://outlook.office365.com/EWS/Exchange.asmx/$metadata'.
    The request failed with HTTP status 400: Bad Request."

    I have copied this url in browser, its working but not able to download its WSDL (XML Schema).

    Can you please let me know why this error is causing? Or

    Am I missing something here?

    Thanks,

    Manoj 

      

    Monday, October 21, 2013 1:45 PM

Answers

  • Hello Manoj,

    The $metadata part of the URL in the error message is causing the error. What are your repro steps? If you are using Visual Studio, what version is it? The $metadata part shouldn't be there. Can you tell whether you are being redirected to that bad URL? Perhaps the proxy generator you are using is for a REST service and so it is looking for a metadata file.

    Can you use this URL instead: 'https://outlook.office365.com/ews/services.wsdl'?

    ......

    So, I reproduced the error using VS 2012. There were some redirects that pointed the generator to some bad endpoints. If I used 'https://outlook.office365.com/ews/services.wsdl', it finally worked after some unnecessary redirects. Strange. 


    Michael | Microsoft Exchange Developer Content

    The Exchange Development Forum Guide has useful information for using the Exchange Development Forum.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Marked as answer by Manoj Yenurkar Wednesday, October 23, 2013 10:00 AM
    Tuesday, October 22, 2013 4:31 PM

All replies

  • Hello Manoj,

    Please use the EWS Managed API instead of adding a web reference from Visual Studio. It is a much simpler API to use. http://www.microsoft.com/en-us/download/details.aspx?id=35371

    With regards,


    Michael | Microsoft Exchange Developer Content

    The Exchange Development Forum Guide has useful information for using the Exchange Development Forum.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Monday, October 21, 2013 7:47 PM
  • Hello Michael,

    My ultimate objective is to consume EWS of Exchange Online (Office365) in my Python code.

    Before consuming this web reference in Python code, I like to verify this EWS of Exchange Online in .Net.

    But I am getting a below error while adding a web reference of this EWS url in my .Net console application.

    "There was an error downloading 'https://outlook.office365.com/EWS/Exchange.asmx/$metadata'.
    The request failed with HTTP status 400: Bad Request."

    Can you please tell me why this is throwing an error? and What will be solution to resolve this?

    Thanks,

    Manoj

    Tuesday, October 22, 2013 6:22 AM
  • Hi Glen,

    I have created a trial Office365 account (exchange online) for testing my application. From the outlook client, I have found that the EWS url of that account 'https://outlook.office365.com/ews/exchange.asmx'.

    I am trying to add web reference of this EWS url in my .Net console application, it is throwing an error as below.

    "There was an error downloading 'https://outlook.office365.com/EWS/Exchange.asmx/$metadata'.
    The request failed with HTTP status 400: Bad Request."

    I have copied this url in browser, its working but not able to download its WSDL (XML Schema).

    Can you please let me know why this error is causing? Or

    Am I missing something here?

    Note: I like to consume Exchange Online EWS in python code. Before that I just want to try/verify this in .Net environment. 

    Thanks,

    Manoj

    Tuesday, October 22, 2013 11:44 AM
  • Hello Manoj,

    The $metadata part of the URL in the error message is causing the error. What are your repro steps? If you are using Visual Studio, what version is it? The $metadata part shouldn't be there. Can you tell whether you are being redirected to that bad URL? Perhaps the proxy generator you are using is for a REST service and so it is looking for a metadata file.

    Can you use this URL instead: 'https://outlook.office365.com/ews/services.wsdl'?

    ......

    So, I reproduced the error using VS 2012. There were some redirects that pointed the generator to some bad endpoints. If I used 'https://outlook.office365.com/ews/services.wsdl', it finally worked after some unnecessary redirects. Strange. 


    Michael | Microsoft Exchange Developer Content

    The Exchange Development Forum Guide has useful information for using the Exchange Development Forum.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Marked as answer by Manoj Yenurkar Wednesday, October 23, 2013 10:00 AM
    Tuesday, October 22, 2013 4:31 PM
  • Thanks Michael for your help.
    Wednesday, October 23, 2013 10:01 AM