coldfusion - 无法使用 cfexchangeConnection 访问委派日历

标签 coldfusion exchange-server exchangewebservices

简介:

我需要访问已在公司 Exchange Server 上将其日历访问权限委托(delegate)给我的用户的日历事件。委派到位,我可以使用 Outlook 2007 客户端查看/修改其他用户的日历,因此我知道委派权限是正确的,但是我无法使用 ColdFusion cfexchange* 标签查询事件。

根据 ColdFusion 文档,这是可能的,参见 http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec14f31-7ff6.html

系统:

  • ColdFusion 10 Enterprise x64 Update 0 在 Ubuntu Server 12.04 x64 LTS 上运行
  • 在 Windows Server 2008 R2 上运行的 Exchange Server Standard 2010 SP 1
  • 在 Windows XP Professional SP3 上运行的 Outlook 2007

  • 详情

    以下代码是我正在使用的,删除了特定和敏感位。如果我删除了mailboxName 属性,或者如果我使用相同的用户名值,那么我能够成功地查看我的25 个日历事件。但是,当我使用将日历访问权限委托(delegate)给我的人的邮箱名称时,我收到以下错误。

    另一个用户从他们的 Outlook 2007 中委派了我的访问权限。他们通过转到“工具”菜单,选择“选项”,单击“代表”,然后单击“添加”按钮,选择我的姓名,单击“添加”按钮,单击“确定”按钮,然后给我 Calendar = Editor 权限和 None 所有其他权限。

    我还应该注意,如果我使用已被授予 Exchange 管理员权限并访问其他用户邮箱的 Exchange 帐户,我可以看到其他用户的事件。但是,如果我尝试使用我的凭据,这是我们需要它工作的方式,它会失败。

    代码:
    <cfexchangeConnection 
      action = "open" 
      connection = "myExchangeConnection"
      username = "myUserName"
      password = "mySecr3t"
      server = "exchange.company.com"
      formBasedAuthentication = "yes"
      formBasedAuthenticationURL = "https://exchange.company.com/owa/auth/owaauth.dll"
      protocol = "https"
      serverversion = "2010"
      mailboxName = "otherUserName"
    > 
    <cfexchangecalendar 
      action="get" 
      name="myCalendar" 
      connection="myExchangeConnection"
      >
      <cfexchangefilter 
        name = "maxRows" 
        value = "25">
    </cfexchangecalendar>
    

    错误信息
    Detail   The specified object was not found in the store.
    Message  Could not connect to the exchange server with the credentials.
    StackTrace   coldfusion.exchange.webservice.EWS
    Exception: Could not connect to the exchange server with the credentials. at coldfusion.exchange.webservice.EWSConnection.login(EWSConnection.java:1777) at coldfusion.tagext.net.exchange.ExchangeTag.createConnection(ExchangeTag.java:499) at coldfusion.tagext.net.exchange.ExchangeConnectionTag.doEndTag(ExchangeConnectionTag.java:70) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2800) at cfindex2ecfm2100699610.runPage(/mnt/hgfs/ftcr/index.cfm:72) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.IpFilter.invoke(IpFilter.java:64) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:443) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:151) at coldfusion.CfmServlet.service(CfmServlet.java:204) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
    

    最佳答案

    我终于能够让它工作了。错误似乎不在于上面发布的代码,而是 Adob​​e 文档中缺乏清晰度以及用户“otherUserName”必须授予“myUserName”的访问权限的调整。

    “开发 ColdFusion 10 应用程序”文档中的“管理与 Exchange 服务器的连接”部分指出“您还可以连接到其所有者已授予登录用户名访问权限的任何邮箱”。我理解这意味着如果所有者仅将日历访问权限委派给我的用户帐户,我就可以查询他们的日历。然而,情况似乎并非如此。用户必须 委托(delegate)日历访问和收件箱访问在我能够查询他们的日历事件之​​前,我的用户帐户。

    我发现实现此目的的另一种方法是创建一个具有 Exchange 管理员权限的 Exchange 帐户并授予其访问用户邮箱的权限。然后,我将使用此 Exchange 帐户作为 cfexchangeconnection 中的用户名和密码,并可以查询该 Exchange 帐户有权访问的任何用户的事件。

    关于coldfusion - 无法使用 cfexchangeConnection 访问委派日历,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13630324/

    相关文章:

    c#-4.0 - 如何在 C# 中使用 Exchange 2010 检索邮件正文

    c# - Exchange Web 服务 – 尝试读取消息属性时出现 “You must load or assign this property before you can read its value” 错误消息

    jquery-ui - jQueryUI 自动完成 - 无法显示返回的选择(Coldfusion)

    java - 我需要从 Microsoft Exchange 服务器上托管的电子邮件发送电子邮件

    json - 在 ColdFusion 中创建嵌套 JSON

    无需用户名/密码且无需管理员参与即可对 Exchange Web 服务进行身份验证

    c# - Office 365 API - 自动登录

    c# - Exchange Web 服务中的多个日历

    javascript - ColdFusion - 如何访问 jQuery 中的 CFC 返回变量?

    caching - Coldfusion/雷洛 : What's the most efficient way to output file contents - fileRead or include?