Determining the Exchange Web Services (EWS) URL for authentication

I’ve recently had to write an ASP.net application which provides Exchange integration for booking meeting rooms. Microsoft provide the Exchange Web Services Management API for use with Exchange 2007 and above. This provides a nice API to performing the usual Exchange functions such as managing inbox’s and calendars.

Before the API can talk to Exchange it requires a connection URL. Microsoft recommend using the Exchange’s Auto Discovery function, however if you want to specify this manually the below will help you find the correct URL.

The Exchange admin can use a PowerShell command on the exchange server

a. Open PowerShell on the Exchange server
b. Type Get-WebServicesVirtualDirectory |Select name, *url* | fl
c. The URL will be provided

Use the Outlook 2007 or 2010 Auto Discovery feature

a. Hold the Ctrl key and right click on the Outlook Icon in the system tray (Note this must be outlook version 2007 or 2010)
b. Select “Test E-mail Auto Configuration” from the menu
c. Type in an email address located on the desired Exchange server
d. Ensure that only the “Use Auto Discover” checkbox is enabled
e. Click “Test”
f. Search the results for the line starting with “Availability Service URL” this line contains the EWS URL

Enable IE 9 Compatibility Mode on your site

As with any new version of Internet Explorer the latest release, IE10 has caused a number of issues. Fixing these issues can take time and if it's a bug in IE you are relying on Microsoft to come up with the goods.

To keep your clients you need a working site as quickly as possible. One of the solutions I use is to force IE10 to display sites using IE9 Compatibility mode. This can be done forced on a page by page bases or the entire site (assuming your site is hosted using IIS).

Page-by-page

Add the following between the head tags of your page.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" >

Entire Site

Add the following to the web.config file.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=EmulateIE9" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

Internet Explorer 9 adding underscore to download filenames

While testing a web page on Internet Explorer 9 I noticed a strange problem. When right clicking a link and selecting Save Target As the dot between the filename and extension was being substituted for an underscore. This wasn’t the case with previous versions of IE.

It appears if IE9 cannot find the specified file for download it does the above.