If Outlook Web Access (OWA) is enabled you simply need to send a HTTP request to the server at the URL http://<server>/exchweb/bin/auth/owaauth.dll, passing the username and password as parameters. If authentication is succesful, two cookies will be returned with the response which should be stored and passed with subsequent requests to the server:

        public static CookieCollection Authenticate(string uri, string domain, string userName, string password)
        {
            // Get the server part of the uri to make up the authentication uri
            StringBuilder authUri = new StringBuilder();
 
            Match match = Regex.Match(uri, "(^https?://.+?)/.*$");
 
            if (match.Success)
            {
                authUri.Append(match.Groups[1]);
            }
            else
            {
                authUri.Append(uri);
            }
            authUri.Append("/exchweb/bin/auth/owaauth.dll");
 
            // Prepare the body of the request
            byte[] body = Encoding.UTF8.GetBytes(string.Format(@"destination={0}&username={1}\{2}&password={3}",
                                                               uri, domain, userName, password));
 
            using (HttpWebResponse response = SendRequest(null, authUri.ToString(), "POST", "application/x-www-form-urlencoded", null, body))
            {
                if (response.Cookies.Count < 2)
                {
                    throw new AuthenticationException("Failed to login to exchange");
                }
                return response.Cookies;
            }
        }