I have a 3-tier ASP.NET 2.0 app. I want to use the Membership.ValidateUser method of the membership class using the credentialls added with the login control. As stupid as it seems, I can't figure out how to have the ValidateUser control call anything but the db specified in the web.config. What I need is it to call down to the middle tier which will authenticate against the db. I can't have the presentation layer authenticate against the db directly.
+1
A:
You just need to create a custom membership provider, inherit from MembershipProvider then wire it up in the web.config. The provider could go in your App_Code folder then call your middle tier
<membership defaultProvider="CustomProvider">
<providers>
<add
name="CustomProvider"
type="YourNameSpace.YourCustomProvider"
connectionStringName="ConnectionString" />
</providers>
</membership>
Jon
2009-07-07 13:08:16