与Outlook日历集成的ASP.NET应用程序的联网技术应用程序、日历、技术、Outlook

2023-09-03 02:41:41 作者:迷毁少年

我可以无视我的用户的叫声不再。他们希望有一个任务调度系统,在某些时候我一定要实现。我在想使我自己的(不能硬),但后来的用户将有两个并排侧题目管理人员的系统,因为他们已经使用Outlook同样的事情。

I can ignore the braying of my users no longer. They want a task scheduling system and at some point I have to deliver. I was thinking of making my own (can't be hard), but then users would have two side-by-side task managements systems since they already use Outlook for the same thing.

在Outlook日历/任务整合方面,两种可能的方法发生了对我说:

In terms of Outlook calendar / task integration, two possible approaches occurred to me:

1)使用JavaScript和自动化

我似乎记得这是可以做到自动化的JavaScript。

I seem to remember it's possible to do automation in JavaScript.

优点:

在我以前做过的自动化。

缺点:

自动化是太可怕了! 在某些持久性(展望 实体)是负责 客户端code和其余的 服务器端的责任 code。这种感觉太可怕了。 在可能的安全问题/ 从IT阻挡部。 Automation is horrible! Some persistence (Outlook entities) is the responsibility of client-side code, and the rest the responsibility of server-side code. This feels horrible. Possible security concerns / blocking from IT dept.

2)使用一些.NET API与Exchange Server的直接

的内部网使用单点登录,所以希望,应该使安全问题变得更加容易。

The intranet uses single-sign on, so hopefully that should make security issues easier.

优点:

所有的持久化code会 服务器端。 All persistence code would be server-side.

缺点:

我甚至不知道那些这样的API 存在。 I don't even know that such an API exists.

与以往一样,我喜欢站在巨人的肩膀上。任何人谁才走过这条道路能不能给我一些指导?

As ever, I like to stand on the shoulders of giants. Can anyone who has trodden this path before give me some guidance?

推荐答案

最近,我们使用的 Exchange Web服务托管API 。这将是要去约第二种选择的一种方式。我从来没有尝试过使用JavaScript一样,所以不知道这一点。

We recently did same kind of integration for our intranet application using the Exchange Web Services Managed API. That would be one way of going about for the second option. I have never tried the same using JavaScript, so no idea on that.

至于查询征求意见1:您将需要您将使用假冒和其他用户账户工作的人一个AD用户。请参考下面的例子:

With regards to the query for comment 1: You would need a single AD user whom you will be using to impersonate and work on the other users account. Please refer to the example below:

可以说我有一个活动目录帐户名为的Fabrikam \ myappname 密码没法比$ GRE @ T2010

Lets say I have an Active Dir account named fabrikam\myappname with password Fabi$Gre@t2010

void CreateFolder(string targetUserEmail) {
    string appName = "myappname";
    string appPassword = "Fabi$Gre@t2010";
    string emailDomain = "fabrikam";
    string appEmail = string.Format("{0}@{1}.com", appName, emailDomain);

    ExchangeService service = new ExchangeService();
    service.Credentials = new NetworkCredential(appName, appPassword, emailDomain);
    service.AutodiscoverUrl(appEmail);

    service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, targetUserEmail);

    Folder newFolder = new Folder(service);
    newFolder.DisplayName = "TestFolder1";

    newFolder.Save(WellKnownFolderName.Inbox);
}

做检查配置Exchange模拟,以使模拟工作的文章。

Do check the article Configuring Exchange Impersonation to make Impersonation working.

希望有所帮助。