【问题标题】:WCF Service calling Windows Authentication protected URLWCF 服务调用受 Windows 身份验证保护的 URL
【发布时间】:2010-11-11 15:10:56
【问题描述】:

我有一个托管在 IIS7.5 中的 WCF 服务,作为特定域帐户运行。称它为 app1。此服务必须调用托管在另一个 IIS 应用程序中的 Windows 集成身份验证保护服务。称之为 app2

app2 IIS 身份验证设置已启用“Windows 授权”,其他所有内容均已禁用。

我已授予 app1 对部署 app2 的 NTFS 资源的身份访问权限。

我正在使用 HttpWebRequest 类从 app1 调用 app2,并且我正在设置 request.credentials = CredentialCache.DefaultNetworkCredentials

我不断收到未经授权的 401 响应。

有什么想法吗?一定很简单:(

【问题讨论】:

    标签: wcf authentication iis-7.5


    【解决方案1】:

    var _httpWebRequest = (HttpWebRequest)WebRequest.Create(serviceUrl); _httpWebRequest.UseDefaultCredentials = true; _httpWebRequest.Method = "POST"; _httpWebRequest.ContentType = "应用程序/xml";

    【讨论】:

    • 如何使用这个调用服务方法?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-23
    • 1970-01-01
    • 2016-04-21
    • 1970-01-01
    • 2014-11-20
    相关资源
    最近更新 更多