使用C#asp.net web登录outlook
我正在使用windows身份验证为intranet构建一个web应用程序。下面是查看outlook日历约会的代码。它只显示我的日历,即使其他人正在使用他们的用户id登录。我认为这与IIS中的应用程序池有关,因为应用程序池正在使用我的凭据。我的问题是,如何使用他们的凭据登录,以便它将取消他们的约会使用C#asp.net web登录outlook,c#,login,outlook,C#,Login,Outlook,我正在使用windows身份验证为intranet构建一个web应用程序。下面是查看outlook日历约会的代码。它只显示我的日历,即使其他人正在使用他们的用户id登录。我认为这与IIS中的应用程序池有关,因为应用程序池正在使用我的凭据。我的问题是,如何使用他们的凭据登录,以便它将取消他们的约会 Microsoft.Office.Interop.Outlook.Application application = new Microsoft.Office.Interop.Outlook.Appli
Microsoft.Office.Interop.Outlook.Application application = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.Folder folder = (Microsoft.Office.Interop.Outlook.Folder)application.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderCalendar);
List<Microsoft.Office.Interop.Outlook.AppointmentItem> todayAppointments = new List<Microsoft.Office.Interop.Outlook.AppointmentItem>();
var query = from p in folder.Items.Cast<Microsoft.Office.Interop.Outlook.AppointmentItem>()
where p.Start.Date > Convert.ToDateTime("2015/11/15") && p.Start.Date <= Convert.ToDateTime("2015/11/20")
select p;
Response.Write(query.Count());
foreach (Microsoft.Office.Interop.Outlook.AppointmentItem appt in query)
{
Response.Write("Subject: " + appt.Subject + " Start: " + appt.Start.ToString("g") + " End: " + appt.End.ToString("g") + "</br>");
}
Microsoft.Office.Interop.Outlook.Application=new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.Folder Folder=(Microsoft.Office.Interop.Outlook.Folder)应用程序.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderCalendar);
List Todayappoints=新列表();
var query=来自文件夹.Items.Cast()中的p
其中p.Start.Date>Convert.ToDateTime(“2015/11/15”)&&p.Start.Date侧注:虽然不应阻止您尝试,但完全不支持以这种方式在服务器上运行Office应用程序。除此之外,常规Windows身份验证将不允许Outlook在没有Kerberos的情况下与Exchange进行身份验证的“第二跳”…旁注:虽然它不应阻止您尝试,但完全不支持以这种方式在服务器上运行Office应用程序。除此之外,常规Windows身份验证将不允许Outlook在没有Kerberos的情况下与Exchange进行身份验证的“第二跳”。。。