【问题标题】:ASP.Net web app authentication issueASP.Net Web 应用程序身份验证问题
【发布时间】:2013-03-01 07:14:09
【问题描述】:

我们有一个 ASP.Net Web 应用程序,其应用程序池的标识是“网络服务”。在这个应用程序中,我们有一个设置页面;那里我们接受用户名。我们在针对 ADSI (Active Directory) 验证用户名时遇到以下异常。如果我们将 App Pool 的身份从“网络服务”更改为我们的域帐户,那么我们就可以成功验证用户名。

这里我们不能使用我们的域帐户作为 App Pool 的身份。请提出任何替代方案来解决此问题。

Exception Information
*********************************************
Exception Type: System.DirectoryServices.DirectoryServicesCOMException
     ExtendedError: -1073740781
      ExtendedErrorMessage: C0000413: LdapErr: DSID-0C0904DC, comment:      AcceptSecurityContext error, data 78f, v1db1
          ErrorCode: -2147023570
Message: Logon failure: unknown user name or bad password.

    Data: System.Collections.ListDictionaryInternal
    TargetSite: Void Bind(Boolean)
       HelpLink: NULL
     Source: System.DirectoryServices
     HResult: -2147023570

    StackTrace Information
      *********************************************
   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
      at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
      at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
   at System.DirectoryServices.DirectorySearcher.FindOne()
         at.-------UserSettings.IsValidUser(String userName)"

【问题讨论】:

    标签: asp.net authentication deployment


    【解决方案1】:

    以域用户身份运行进程(IIS 进程或 ASPNET 进程)。这意味着设置应用程序池标识。

    在 IIS5 中,将匿名帐户 (IUSR_MACHINE) 设置为域用户,然后使用 .

    在更高版本的 IIS 中,将服务帐户添加到 IIS_WPG 组。

    【讨论】:

      猜你喜欢
      • 2014-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-25
      • 2012-05-27
      • 1970-01-01
      相关资源
      最近更新 更多