exchangewebservices - EWS call using Managed API 2.2 never returns -
i'm using ews managed api v2.2 make ews calls. @ 1 of customers, have weird situation service calls, service call, never receives response.
we setting explicit timeout, surrounding service calls logging , using ews trace listening. listener show ewsrequest soap message, , that's it. logging shows "before service call" log entry not "after service call" entry.
i suspected throttling might behind , have temporarily removed ews throttling limits no effect , in case, expect error response if throttling kicking in.
this how service initialised:
public exchangewebservice(string username, string password, string emailaddress, string exchangeurl, string exchangeversion) { exchangeversion exversion = (exchangeversion)enum.parse(typeof(exchangeversion), exchangeversion); _exchangeservice = createexchangeservice(username, password, emailaddress, exchangeurl, exversion); _exchangeservice.timeout = 30000; } private static exchangeservice createexchangeservice(string username, string password, string emailaddress, string exchangeurl, exchangeversion exchangeversion) { integrationlogging _il = new integrationlogging(constants.loggingsourcename); exchangeservice service = new exchangeservice(exchangeversion); qualifiedusername qualifiedname = new qualifiedusername(username); networkcredential credentials = new networkcredential(qualifiedname.username, password); if (qualifiedname.hasdomain) { credentials.domain = qualifiedname.domain; } service.credentials = credentials; if (string.isnullorempty(exchangeurl)) { if (string.isnullorempty(emailaddress)) { throw new argumentexception("emailaddress , exchangeurl parameters cannot both empty"); } else { _il.writetrace(string.format("createexchangeservice using auto discovery email address {0} , user name {1}. {2}", emailaddress, username, environment.stacktrace)); service.autodiscoverurl(emailaddress); } } else { _il.writetrace(string.format("createexchangeservice using ews uri {0} , user name {1}", exchangeurl, username)); service.url = new uri(exchangeurl); } return service; }
from 1 of methods never returns, first log entry not second , our perf monitor shows thread still running @ line of service call.
_il.writetrace("convertinternalidtoewsid:mailboxaddress=" + mailboxaddress); alternateidbase _altbase = _exchangeservice.convertid(_alternateid, idformat.ewsid); _il.writetrace("convertinternalidtoewsid:returned call"); return ((alternateid)_altbase).uniqueid;
the service instance of type microsoft.exchange.webservices.data.exchangeservice
.
this problem seems intermittent. how can call not result in response, exception or timeout?
hey i'll double check when i'm @ office... had similar issue...
in case return, had leave quite sometime.
i had mine wrapped in try/catch, , put break point on catch.
cannot remember, think happened when using wrong auto discover email address.
try { service.autodiscoverurl(emailaddress); } catch (exception) { //break point here , leave @ least 10 min throw; }
Comments
Post a Comment