Sorry, I know it sounds subjective, but it's quite technical and specific. But any brainstorming is quite welcome and there may not be one right answer.
So, I'm working on a new project that will involve various tools for Exchange Server 2007/2010, most of these tools would ideally be Firefox add-ons and now with Google Chrome having limited extension support, we thought we'd give that a try too.
These will be very basic tools like alarms for meetings and what not, but the first step (if you go back to my last two questions), is to implement autodiscovery to get the server URLs such as the public directory, the LDAP server (and binding bit), and EWS and OWA.
To get this information is easy, you send a generic XML request to the autodiscover URL and it responds back with an XML of everything and more. The tricky part is finding out the autodiscover URL.
Microsoft offers 5 options for how to get the autodiscover URL, and I've tried all of them with mixed success. The problem is that I don't know if any of them could be used within a browser extension environment. Here's their list:
Do an LDAP query for Service Connection Points (SCPs) from the Active Directory. The only issues is I have no idea what that means, how to query it, whether I can reliably determine the AD location from just a base SMTP server, and even if none of those were issues, I don't think Firefox or Chrome have native LDAP support.
Try out a standard autodiscovery URL: https://contoso.com/autodiscover/autodiscover.xml I tried this one, and even on the internal network of my Exchange server it timed out and only then after 2 minutes.
Try the other standard URL: https://autodiscover.contoso.com/autodiscover/autodiscover.xml This one just came back not found, no timeout.
Send an unsecure, non-authenticated request to: http://autodiscover.contoso.com/autodiscover/autodiscover.xml
This one works GREAT, I even tried a few other Exchange servers I know since this method requires no authentication. The URL redirects to the right URL and asks for credentials.
The only problem is that ajax requests apparently don't return 302 replies, they either fail or continue on.
- Finally: n DNS SRV lookup to _autodiscover._tcp.contoso.com
This also did just fine, but no major browser I know of (not Firefox or Chrome at least0 support this type of DNS lookup.
So of the choices, one is ldap, two are generic URLs that may or may not work and for my test server did not. one is the 302 that can't be done over XHR, and the last is the DNS SRv.
So I'm looking for creative ideas on what someone (me) could do in this situation to get one of the non-generic URL ideas working reliably.
My best idea so far is I could have the browser open a random window or iframe and point it to the http address and see where it goes. But since I know it eventually goes to a login window, I would rather avoid confusing the customer and I also know that Chrome is really strict about viewing headers, etc.
Anybody else got anything?