将IIS凭据传递给EWS [英] Pass IIS Credentials to EWS

查看:73
本文介绍了将IIS凭据传递给EWS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将凭据(我在命令提示符中输入)传递给交换网络服务?

Is it possible to pass the credentials (which I`m typing in the command prompt) to an exchange web Service?

我的网站托管在IIS上(Windows身份验证和身份impersonate = true)。现在我正在寻找一种方法将输入的Credentials传递给我的交换Web服务功能。看起来像这样:

My Website is hosted on IIS (Windows Authentication and Identity impersonate=true). Now I´m looking for a way to pass the typed in Credentials to my exchange Web Service Function. Which looks like that :

service = New ExchangeService() With {
                   .Credentials = New WebCredentials(ConfigurationManager.AppSettings("ExchangeUser"), ConfigurationManager.AppSettings("ExchangePW")),
                   .Url = New Uri(ConfigurationManager.ConnectionStrings("ExchangeUri").ConnectionString)}

可以使用代码中的类型信息吗?

Can is used the typed information in the code ?

推荐答案

您好

尝试 

new NetworkCredential("username", "password", "domain");





这篇关于将IIS凭据传递给EWS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆