具有自定义表单的 SharePoint 2010 FBA - 403 错误
我有一个 SharePoint 2010 网站,该网站配置为使用自定义角色、成员资格和配置文件提供程序进行基于表单的身份验证。使用 OOTB SharePoint 2010 FBA 表单(即 Web 应用程序虚拟目录中的 /_forms 下)可以完美地实现这一点。
我的问题是位于单独文件夹 /Landing/Login/default.aspx 中的自定义登录表单。我已将 Web 应用程序配置为指向此表单(包含未修改的 ASP.NET 登录控件),该表单在用户点击根 URL 时呈现。当他们提交凭据并且表单发回以重定向到 /_layouts/Authenticate.aspx 时,问题就出现了。收到 403 错误后就停止了。
如果我恢复到 OOTB FBA 表单(使用相同的提供商),一切都会正常。关于可能出什么问题有什么建议吗?
I have a SharePoint 2010 site that is configured for Forms Based Auth using custom role, membership and profile providers. This works perfectly using the OOTB SharePoint 2010 FBA form (ie. under /_forms in the web app virtual directory).
My problem is with a custom login form that is located in a separate folder, /Landing/Login/default.aspx. I've configured the web app to point to this form (contains an unmodified ASP.NET login control), which is rendered when the user hits the root URL. The problem comes when they submit their credentials and the form posts back for the redirection to /_layouts/Authenticate.aspx. It stops cold with a 403.
If I revert back to the OOTB FBA form (using the same providers) everything works fine. Any suggestions on what could be going wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
因此,在检查继承自 Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage 的 OOTB FBA 登录表单并使用 Reflector 查看代码后,我发现了解决方案。
我修改了自定义表单以从同一对象继承,并从 OOTB 表单复制内容占位符(其中一些占位符放入面板控件中,可见性设置为 false)。
急速。我的自定义表单现在可以完美地进行身份验证。经过反思,这似乎是一件显而易见的事情,只是没有在任何地方记录下来。
So, I discovered the solution after examining the OOTB FBA login form that inherits from Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage and taking a look at the code with Reflector.
I modified my custom form to inherit from the same object and replicated the content placeholders (some I put into a panel control with the visibility set to false) from the OOTB Form.
Presto. My custom form now authenticates flawlessly. On reflection, this seems an obvious thing to do, just isn't documented anywhere.
我刚刚亲自经历了这个过程,并写下了让 FBA 使用自定义登录表单所需采取的步骤。希望它能帮助下一个试图让它发挥作用的可怜人。
http://mikevallotton。 wordpress.com/2010/10/18/sharepoint-2010-claims-authentication-custom-login-form-2/
I just went through this process myself, and wrote up the steps I had to take to get FBA working with a custom login form. Hopefully it'll help the next poor soul that is trying to get this to work.
http://mikevallotton.wordpress.com/2010/10/18/sharepoint-2010-claims-authentication-custom-login-form-2/
如果您想使用现成的解决方案来管理FBA用户,您应该看看这里:
http://www.devit.eu/products/121-fba-manager-sp2010-forms-based-authentication.aspx
If you want to use ready-made solutions for the management of FBA users, you should take a look here:
http://www.devit.eu/products/121-fba-manager-sp2010-forms-based-authentication.aspx