2013-05-26 102 views
0

我試圖設置一個到我們的office365服務器的cfexchangeconnection來檢索日曆設置,但無法獲得正確的連接設置。coldfusion與Office 365交換連接

如果我這樣做:

<cfexchangeconnection 
    action = "open" 
    connection = "exCon" 
    server = "outlook.office365.com" 
    username = "[email protected]" 
    password = "**********" 
    port="995"> 

我得到500:無法登錄到Exchange服務器。驗證服務器名稱,用戶名和密碼。

我不知道是否這意味着它的一個auth問題是否我剛剛得到的服務器名稱錯誤

如果我在端口掀起我得到同樣的錯誤。

服務器名稱是爲使用imap或pop設置郵件而提供的名稱。用戶名僅僅是電子郵件和密碼是顯而易見....

切換協議HTTPS我得到以下錯誤:

Cannot access Exchange server as a web application at outlook.office365.com. 
Ensure that the Exchange web application is configured in IIS and Web Service Extension for the Exchange server is allowed. HTTP response code : 404 
+0

你能用用戶名和密碼直接登錄網站嗎? –

+0

是的。用戶名和密碼確實有效。我已經檢查過。 – Rumpleteaser

+1

我假設有一個涉及的證書。當你直接登錄是安全的? ColdFusion可能需要該證書。 –

回答

0

下面的配置爲我工作。您必須使用keytool.exe安裝證書。確保添加serverversion,並選擇2010.另外,請確保指定https協議。默認值是2007.

<cfexchangeconnection action="open" 
    username="#username#" 
    password="#password#" 
    mailboxname="#mailboxname#" 
    server="outlook.office365.com" 
    protocol="https" 
    serverversion="2010" 
    connection="testconn1" 
    formBasedAuthentication="true" 
    formBasedAuthenticationURL="https://outlook.office365.com/owa/auth/owaauth.dll">