c# - Exchange Web Services Autodiscover non default link -


i writing piece of software runs on utility device on customers network, not on domain. autodiscover service not available off domain same either on domain or on internet. none of ways service works default find according docs, customer's staff tells me, supposedly :/ , work if can access autodiscover @ link gave me. there way override default approach , pass url autodiscover from? hardcoding link /exchange.asmx not option nor adding device domain.

i reusing, , tweaking, tried , true piece of software has been deployed many times, situation first.

using ews managed api may able using autodiscoverservice class. has constructor takes uri of autodiscover service parameter.

your code should this. note disable scp lookup not on domain. have not tried code give try:

autodiscoverservice ads = new autodiscoverservice(new uri("...")); ads.enablescplookup = false; ads.credentials = new networkcredential(...); ads.redirectionurlvalidationcallback = delegate { return true; }; getusersettingsresponse grresp = ads.getusersettings("someemail@domain.com", usersettingname.externalewsurl); uri casuri = new uri(grresp.settings[usersettingname.externalewsurl].tostring());  var service = new exchangeservice() {     url = casuri,     credentials = ads.credentials, }; 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -