【发布时间】:2014-08-31 17:18:00
【问题描述】:
我正在尝试了解如何配置需要传递用户凭据并获取一些邮件内容的网站 (ASP.Net)
根据应用程序池配置,我会遇到不同类型的错误, 完整的方法是什么?我的意思是代码+配置;o)
我不想写用户和密码,而是通过windows认证来获取它们
谢谢
代码:
Service = new ExchangeService(ExchangeVersion.Exchange2010_SP2)
{
Url =
new Uri(
"https://xxx/yyy.asmx"),
//UseDefaultCredentials = true doesnt help
};
var view = new ItemView(1820);
// Find the first email message in the Inbox that has attachments. This results
FindItemsResults<Item> results = Service.FindItems(folderName, view);
//Here I get the error 401
【问题讨论】:
标签: email authentication exchangewebservices intranet integrated