【问题标题】:AutoCompleteExtender - authentication failure (forms authentication)AutoCompleteExtender - 身份验证失败(表单身份验证)
【发布时间】:2010-08-27 17:18:03
【问题描述】:

我在我的 aspx 页面上使用 AJAX 控件工具包中的 AutoCompleteExtender - 我将它连接到返回字符串数组的 WCF 服务,一切正常。

如果我更改我的服务定义以包含对调用者进行身份验证的要求,如下所示:

<OperationContract(), PrincipalPermission(SecurityAction.Demand, Authenticated:=True)> _
Public Function GetLookupValues(ByVal prefixText As String, ByVal count As Integer, ByVal contextKey As String) As String()

然后自动完成扩展器停止工作,并且我在服务中收到身份验证错误。该服务设置为使用 ASPNetCompatibility 模式,我希望扩展程序能够为我的登录用户传递身份验证凭据 - 有谁知道如何进行这项工作?

【问题讨论】:

    标签: asp.net asp.net-ajax forms-authentication


    【解决方案1】:

    here 上的示例提到了 AutoCompleteExtender 上的 ContextKey 属性。如果在扩展器上设置此属性,行为会改变吗?

    另外this StackOverflow 的帖子可能会有一些答案。

    【讨论】:

    • 我不确定这是否真的回答了这个问题——我已经传递了一个上下文密钥,这是另一篇文章所处理的——我的问题在于身份验证。
    【解决方案2】:

    以防万一有人发现并好奇,我最终切换回“旧”样式 (asmx) Web 服务,效果很好。

    【讨论】:

      猜你喜欢
      • 2017-11-27
      • 2013-10-30
      • 1970-01-01
      • 2020-08-28
      • 1970-01-01
      • 2014-01-24
      • 2018-11-02
      相关资源
      最近更新 更多