表单验证的ValidateUser问题
我正在使用 SharePoint 2007 Enterprise + 发布门户模板 + Windows Server 2008。我正在 SharePoint Server 2007 上使用 ASP.Net + C# + .Net 3.5 + VSTS 2008 进行开发。我正在开发基于表单身份验证接口的自定义表单身份验证。我正在学习在 SharePoint 中使用表单身份验证,我的困惑是关于此方法 - 表单身份验证的 ValidateUser,这里是 MSDN 链接,
http://msdn.microsoft.com/en-us/library/system.web.security.membershipprovider.validateuser.aspx
我的困惑关于哪个组件将调用 ValidateUser 方法?
- 我需要自己调用ValidateUser(我的应用代码),还是取决于我的需求(并不总是需要,取决于我的应用场景);
- ValidateUser 是否由 SharePoint 代码(不是我自己的应用程序代码)调用,如果是,何时调用(即 SharePoint 在什么情况下会调用 ValidateUser 方法,或者换句话说,SharePoint 中的哪些操作会触发该方法的调用)?
提前致谢, 乔治
I am using SharePoint 2007 Enterprise + Publishing portal template + Windows Server 2008. And I am developing using ASP.Net + C# + .Net 3.5 + VSTS 2008 on SharePoint Server 2007. I am developing a custom Forms authentication based on Forms authentication interface. I am learning using Forms Authentication with SharePoint and my confusion is about this method -- ValidateUser of Forms Authentication, here is MSDN link,
http://msdn.microsoft.com/en-us/library/system.web.security.membershipprovider.validateuser.aspx
My confusions are about which component will call ValidateUser method?
- Do I need to call ValidateUser by myself (my application code), or depends on my needs (not always needed, depends on my application scenario);
- Is ValidateUser is called by SharePoint code (not my own application code), if yes, when (i.e. in what situations will SharePoint calls ValidateUser method, or say in other words, what operation in SharePoint will trigger invocation of this method)?
thanks in advance,
George
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
调用
ValidateUser
方法来验证是否已正确输入用户的用户名和密码。它在身份验证过程中被调用。如果您的
web.config
文件配置为使用自定义成员资格提供程序,则如果/_layouts/login.aspx
)。如果匿名用户访问的内容被阻止,SharePoint 会将未经身份验证的用户重定向到此页面。如果您自定义默认的 SharePoint 登录页面并且不使用 ASP.NET 登录控件,则您必须自己调用
ValidateUser
。The
ValidateUser
method is called to verify that a username and password have been correctly entered for a user. It is called during the authentication process.If your
web.config
file is configured to use your custom membership providerValidateUser
is called automatically if/_layouts/login.aspx
). SharePoint will redirect unauthenticated users to this page if the content being accessed is blocked for anonymous users.You will have to call
ValidateUser
yourself if you customize the default SharePoint login page and you don't use the ASP.NET Login control.