Maybe I should expand on what I'm trying to do and how much (little) progress I've made.
We have a database that contains user information that we wish to have DNN use as primary authenticator, i.e., if the user doesn't exist in our database then deny login access to the portal. If the user exists in our database then check the DNN users for the corresponding user. If found, log the user in. If not found, then create the user in DNN using the userid/password combination from our database.. I believe (but am not positive) that what I need to do to accomplish this is write a custom membership provider for our DNN version 4.09.02.
I downloaded a Wrox Blox entitled "Done in 60 Minutes: Building a Custom DotNetNuke Membership Provider" by Antonio Chagoury (the 60 minutes part may be a bit optimistic). I followed the instructions to create a custom membership provider by copying the AspNetMembership project and modifying the namespaces and class names, and adding the project to our website project. After some tweaking, I got it to build with no errors.
I first tried to just modify the web.config per the article's instructions to add my provider as the default membership provider as shown below. (my provider is the IDXMembershipProvider).
<members defaultProvider="IDXMembershipProvider">
<providers>
<clear/>
<add name="AspNetMembershipProvider" type="DotNetNuke.Security.Membership.AspNetMembershipProvider, DotNetNuke.Provider.AspNetProvider" providerPath="~\Providers\MembershipProviders\AspNetMembershipProvider\"/>
<add name="IDXMembershipProvider" type="DotNetNuke.Security.Membership.IDXMembershipProvider, DotNetNuke.Provider.IDXNetProvider, Culture=neutral" providerPath="~\Providers\MembershipProviders\IDXMembershipProvider\"/>
</providers>
</members>
Doing this caused the application to throw an error on startup:
[ArgumentNullException: Value cannot be null.
Parameter name: type]
System.Activator.CreateInstance(Type type, Boolean nonPublic) +7467190
DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName, Boolean UseCache) +584
DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, Boolean UseCache) +26
DotNetNuke.Security.Membership.MembershipProvider.CreateProvider() +31
DotNetNuke.Security.Membership.MembershipProvider..cctor() +13
[TypeInitializationException: The type initializer for 'DotNetNuke.Security.Membership.MembershipProvider' threw an exception.]
DotNetNuke.Security.Membership.MembershipProvider.Instance() +0
DotNetNuke.Entities.Users.UserController..cctor() +5
[TypeInitializationException: The type initializer for 'DotNetNuke.Entities.Users.UserController' threw an exception.]
DotNetNuke.Entities.Users.UserController.GetUserCountByPortal(Int32 portalId) +0
DotNetNuke.Entities.Portals.PortalInfo.get_Users() +20
DotNetNuke.Entities.Portals.PortalSettings.GetPortalSettings(Int32 TabId, PortalAliasInfo objPortalAliasInfo) +1727
DotNetNuke.Entities.Portals.PortalSettings..ctor(Int32 tabId, PortalAliasInfo objPortalAliasInfo) +76
DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +3391
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
There were some forum posts on this error, but all the posts were on previous versions of DNN, and their suggestions didn't help. I tried adding my compiled dlls as references to the web project, with no luck.
I then used the AspNetMembershipProvider.dnn manifest as a template to create a manifest file for my provider, and zipped it up. I then went into Host Settings/Authentication Settings, pointed to my .zip file, and installed it with no errors. It did NOT show up under the list of authentication providers (perhaps because it's not an authentication provider, but I don't know of any way to "install" a membership provider). If I then set my provider back to the default, it throws the same exception as above.
Obviously I am missing some fundamental step(s) in accomplishing this task, and have been unable to find anything but the abovementioned Wrox Blox detailing the process for creating and installing your own membership provider. I am new to DNN, so I expect the problem exists between keyboard and chair. Any help will be gratefully accepted.
Thanks
Pete