Whidbey Goes To Far?
Why is it that Microsoft can't seem to call users “users” and groups “groups?” Role based security is great and all, but how many people outside of the framework team actually call groups “roles?” I guess User wasn't short enough either, because someone thought it had to be called a “MembershipUser” instead.
Why is GetNumberOfUsersOnline a method of the IMembershipProvider interface? After all there is no way to accurately determine this if you are using the SQL provider (yes, they do have a “workaround” for the obvious problem, but the number definately is not going to be accurate, and the IsUserOnline method can't be trusted to return valid answers either). However, if that wasn't enough, the fact that the AD implementation must always return 0 should have been another clue.
Is the person who came up with that bright idea the same one who decided that the interface should support secret questions and answers? Again, the AD provider doesn't support this either, but just throws a generic HttpException containing the text “API not supported”.
On the same note, why is there a GetPassword member, which also cannot be supported (and for a good reason) by most directory services (including AD).
How is a generic exception containing the text “API not supported“ any better than a “Method not found“ exception thrown by the framework? Why do we have interfaces in the first place if we aren't going to require that classes implement their contracts?
So, we have crappily named interfaces full of members that can never be implemented under many circumstances. Maybe they should have just made them an application block instead so that we could ignore them.