Lync and Exchange Web Services Over HTTP

Spoiler: It doesn't work.

The behavior you'll see is that the Lync client will issue the Autodiscover query, receive a successful response, and then never even attempt to contact the EWS URL. No DNS lookup, no HTTP request, nada. Consequently you'll see "EWS not deployed" in the configuration info or get the red bangs on the conversation history and phone tabs.

The only fix available is to modify your EWS virtual directory URLs to be HTTPS instead of HTTP, which you probably should be doing anyway, but I have run across deployments where this was not the case. After the change to HTTPS the Lync client will begin contacting the EWS URL correctly.

Redirecting CWA 2007 R2 from HTTP to HTTPS in IIS 7

This task has always been more of a pain that it ever should have, regardless of application. After trying a few of the usual hacks like requiring SSL and using a custom error page or an HTTP to HTTPS module I found I still wasn’t having any luck. From what I can tell this is because there actually isn’t any kind of default web page in the CWA virtual directory so when you browse to the HTTP version of the site you actually get a 404 “Page not Found” error before anything else happens.

I ended up keying off that idea and changed the 404 error page to be a redirect to the HTTPS page. I’m still testing this out, but I haven’t run into any issues yet with this approach. To change your site the same way:

  1. Open IIS 7 Manager.
  2. Click on the CWA virtual web site you want to redirect.
  3. Double-click on Error Pages.
  4. Highlight 404 and press Edit in the right pane.
  5. Select the Respond with a 302 redirect, enter https://My-CWA-URL and click OK.
  6. Run a iisreset /noforce for good measure.

I’m curious how this works for everyone and if you see any issues with this method.