Protect Exchange ActiveSync from premature firewall connection timeouts

One form of firewall attack involves wasting server-side resources by opening and holding open many connections to the same server. To prevent this type of attack, many administrators close firewall connections after a predetermined period of inactivity. The exact timeout varies and can be adjusted, but it's usually somewhere between 10 and 20 minutes for an HTTP connection.

Unfortunately, this form of intrusion defense can cause problems for

    Requires Free Membership to View

Exchange Server ActiveSync's direct push technology.

Exchange Server listens for a ping from every mobile device that's connecting to it via ActiveSync direct push, and uses a default of nine minutes for this interval. Some firewalls or proxies will close an inactive HTTP connection after less time than that, which means that the mobile device won't get a response back from the Exchange server.

There are two ways to get around this problem if your firewall or proxy is forcing HTTP connections to time out prematurely.

First, you can change the timeout value on the firewall or proxy. This will vary between makes and models of firewalls/proxies, of course, but there is almost always a way to do this.

If it isn't possible or practical to change the timeout value, the Exchange 2003 server handling ActiveSync connections can be configured to use different heartbeat intervals:


  1. Open the registry on the computer hosting Exchange Server and navigate to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MasSync\Parameters.


  2. Add two DWORD values: MinHeartbeatInterval and MaxHeartbeatInterval.

    Both values are calibrated in seconds, and the defaults are 60 and 2700, respectively. The latter value should be set to just below the HTTP timeout threshold, and the former can be anywhere from 1 to MaxHeartbeatInterval. If you want to revert to the default hard-coded values, simply delete these keys.


  3. Restart the IIS Admin Service to make the changes take effect.

About the author: Serdar Yegulalp is editor of the Windows Power Users Newsletter.

Do you have comments on this tip? Let us know.

Related information from SearchExchange.com:


This was first published in September 2006

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.