【问题标题】:Why can't I debug/step-into FormsAuthentication.Authenticate?为什么我不能调试/单步执行 FormsAuthentication.Authenticate?
【发布时间】:2010-12-21 16:39:42
【问题描述】:

我在 ASP.NET MVC 2 (VS 2010) 中使用 FormsAuthentication 进行活动目录身份验证时遇到了一些问题。

据我了解,如果我在 Options->Debug->General 中选中“启用源服务器支持”和“启用 .Net Framework 源单步执行”,我应该能够进入/通过 FormsAuthentication.Authenticate 的 Microsoft 源代码并在 Options->Debug->Symbols 中指定“Microsoft Symbol Servers”。

我已经这样做了,可以进入一大堆 MS 源代码,但不是FormsAuthentication.Authenticate。调试器简单地跳过它。

谁能告诉我这是为什么?如果我能踏入FormsAuthentication.Authenticate,那会让我的生活轻松很多。

谢谢。

【问题讨论】:

  • 是什么让您认为问题出在 FormsAuthentication 类中?我想通过寻找使用 ASP.NET MVC 的 AD 身份验证示例会更好地为您服务,这些示例无疑是在网络上存在的。
  • 我已经阅读了在线示例,但遇到了一个问题 - 因此我现在正在尝试调试......这是我遇到问题的调试。

标签: asp.net asp.net-mvc debugging visual-studio-2010 forms-authentication


【解决方案1】:

好吧,我的笨蛋。

我应该一直使用 Membership.ValidateUser 而不是 FormsAuthentication.Authenticate。

我的问题都解决了:)

但是,我从来不明白为什么我不能进入 FormsAuthentication.Authenticate。我想这仍然是一个谜......

【讨论】:

  • 问题:Rep=5,答案:Rep=28 这看起来很奇怪 - 你的帐户没有合并吗?如果不是,您应该请版主这样做。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-06-19
  • 1970-01-01
  • 2016-05-04
  • 1970-01-01
  • 2014-11-24
  • 1970-01-01
相关资源
最近更新 更多