简体   繁体   English

ASP.NET成员资格:登录控件源代码

[英]ASP.NET Membership: Login Controls Source Code

Is the source code for the common login controls available? 常用登录控件的源代码是否可用?

Those are the controls which are available under Login section in Toolbox: 这些是在“工具箱”的“登录”部分下可用的控件:

  • Login, 登录,
  • LoginView, LoginView,
  • PasswordRecovery, 找回密码,
  • LoginStatus, LoginStatus,
  • LoginName, 登录名,
  • CreateUserWizard, CreateUserWizard控件,
  • ChangePassword 更改密码

Eventually could you point me to a good source of custom implementation of functionality that those controls provide, or some guidance on implementing this functionality without using the mentioned controls. 最终,您能否为我指出这些控件提供的功能的自定义实现的良好来源,还是在不使用上述控件的情况下实现此功能的一些指导。

I am using Visual Studio 2005 (.net2) 我正在使用Visual Studio 2005(.net2)

I will be using SQLMembershipProvider as the MembershipProvider but that probably should make no difference. 我将使用SQLMembershipProvider作为MembershipProvider,但这可能没有什么区别。

"the entire framework is available" is not true. “整个框架可用”不是正确的。 :) :)

The source code for the entire framework is available. 整个框架的源代码均可用。 The link below provides some details as to how to access: 以下链接提供了有关如何访问的一些详细信息:

http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx

I am going to give this a qualified "NO". 我要给它一个合格的“否”。

I have gone down the road of implementing an implementation of the Login server control using reflected source as a starting point (this was before symbol server integration). 我已经走了使用反射源作为起点来实现Login服务器控件实现的道路(这是在符号服务器集成之前)。

Things seem to go swimmingly, with a few reflection hacks to get to core framework members that obviate reams of code. 事情似乎进行得很顺利,有一些反思性的技巧可以帮助核心框架成员避免大量的代码。

Until you get to the designers. 直到您接触到设计师。 That infrastructure is a minefield and gets wide and deep with a quickness and is filled with even deeper buried internal types that need implementations or reflection hacks. 该基础设施是一个雷区,并且迅速而广泛地深入,并充满了需要实现或反射黑客的更深层次的内部类型。

Ultimately wound up with a working control that I could extend but would never want to maintain. 最终,我有了一个可以延长但永远不想维护的工作控件。

The effort was not wasted; 这项努力没有白费。 I learned a lot about how over engineered server controls are designed. 我学到了很多有关如何设计过度设计的服务器控件的知识。

And then I just shifted a login control to template mode and got everything I needed to get done in a few lines of code. 然后,我只是将登录控件转换为模板模式,并通过几行代码完成了我所需的一切。 ;-) ;-)

Except as a learning experience I would certainly recommend against going down that road. 除了作为学习经历,我当然会建议不要走这条路。

Good luck. 祝好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM