Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Do we need to provide the credentials while using EWS Managed API.

$
0
0

hi All,

 

1> i am trying to use the EWS Managed Api in Exchange server OWA customization.

i have a custom form in owa on which i am fetching all contacts.

while using ExchangeService class when i pass the credentials the code works but when i write

service.UseDefaultCredentials = true; and try to run the code in owa i get follwing exception

When making a request as an account that does not have a mailbox, you must specify the mailbox primary SMTP address for any distinguished folder Ids.

here is the code that i am using to instantiate the class.

 ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
 service.UseDefaultCredentials = true;
 service.Url = new Uri("https://MYSERVER/EWS/Exchange.asmx");

please let me know where i am going wrong.

 

2> also Another question when i use EWS then i can use UseDefaultCredentials = true; with perfection.

 

also what should i use(EWS API or Normal EWS) to get all contact,calendaritems etc on owa.

Pls Note : i am adding custom page to OWA.

<form id="form1" action="Test.aspx" method="post">
<input id="__VIEWSTATE" name="__VIEWSTATE" type="hidden" value="/wEPDwUJNzgzNDMwNTMzZGQ=" />
</form>

Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>