Skip to main content
Participant
June 23, 2012
Question

Coldfusion 10 and Exchange Server 2010

  • June 23, 2012
  • 2 replies
  • 1980 views

I am using Coldfusion 10 and I have been trying to connect to Exchange server 2010.

I keep getting this error message: Unable to connect to the Exchange server using HTTP/HTTPS protocol. HTTP response code : 302

I have asked the Coldfusion hosting service to check the cacert for the required certificates and they said that all of the certificates for the hosted exchange server were installed.

If I use the serverVersion="2010" tag I get this error:

Could not connect to the exchange server with the credentials.

Exchange Server doesn't support the requested version.

The company that is hosting my exchange server account just recently upgraded their servers to Exchange Server 2010. When they were running Exchange Server 2007 and i was using Coldfusion 8 my script worked fine.

Any ideas why I am unable to connect to the exchange server  now.

Below is the script that I am running.

<!DOCTYPE HTML>
<html>
<head>
<title>Untitled Document</title>
</head>

<body>
<cfoutput>
  <cfset count = 0>
  <cfset serverName="ex2010.gothamemail.com">
  <cfset username="xxxxxxxx@xxxxxxxx.xxx">
  <cfset password="xxxxxxxxxxx">

  <cfexchangeconnection 
          action="open"
          Protocol="https"

          connection="myExchangeConnection"
          username="#username#"
          password="#password#"
          server="#serverName#">

     <cfexchangecontact
          action = "get"
          name = "current_contacts"
          connection = "myExchangeConnection">

   <cfexchangefilter name="MaxRows" value="2781">
  </cfexchangecontact>  

  <cfexchangeconnection action="close" connection="myExchangeConnection" />
  </cfoutput>

<table width="100%" border="1">
   <tr><th>No.</th><th>UID</th><th>Firstname</th><th>Lastname</th><th>Email</th></tr>
   <cfoutput query="current_contacts">
        <cfset count = #count# + 1>
       <tr><th>#count#</th><th>#UID#</th><th>#Firstname#</th><th>#Lastname#</th><th>#Email1#</th></tr>
   </cfoutput>
</table>

  <cfexchangeconnection
     action="close"
     connection="myExchangeConnection">

</body>
</html>

This topic has been closed for replies.

2 replies

Inspiring
June 27, 2012

I don't see anywhere in your CFEXCHANGE tags that you specify the version to be 2010.  I think it defaults to 2003:

serverversion="2010"

-reed

Participant
June 27, 2012

Thank you for all of the replies. I posted the script without the serverVersion tag although I did try the script with that tag included but I kept getting an error from the server stating that serverVersion = "2010" was not supported.

In the end and after three weeks of trying to get the script to work I switched to different Exchange Server 2010 hosting service and ran the same script with the serverVersion tag included and was able to connect to the email account. It appears that the Exchange Server setting used by the previous hosting company was preventing me for connecting to the server. Case closed.

Participating Frequently
June 25, 2012

You might try adding the formBasedAuth option in your cfexchangeconnection.   I has similar trouble and my solution was to add the application file with "exchangeServerVersion=2010" and to track down the location of owa on my Exchange servers.

<cfexchangeconnection

action = "open"

connection = "CurrentRandSet"

server = "webmail.***********"

username = "*******"

password = "***********"

protocol = "https"

formBasedAuthentication = "true"

formBasedAuthenticationURL = "https:/**************/owa/auth/owaauth.dll"

>