Great news...it's now working. Here's the story:
I had some trouble uninstalling the provider due to file permissions on my website (related to me having it checked into source safe). The uninstaller showed errors during the uninstall, but the provider disappeared from the Host Settings screen.
I tried installing the source of the provider by renaming the resources file to be a .zip, but the install failed because there were some files missing (the ascx files etc) and there was still some data in the database (foreign key exceptions during install).
At this point I figured the database was completely out of sync, so I had no qualms deleting the authentication data by hand (even though I don't know all the places it writes data).
Again, I attempted the install of the source provider, but it failed because of missing files.
At this point, I dug out the source version of DNN, added the authentication provider source, brought in the missing files, and compiled.
Then I tried browsing to the new site, but it kept redirecting to my original site. I tried changing the portalalias in the database, but the site wouldn't even load then.
I figured I may be able to attach the source project to the running instance of IIS (given it's all on my local client). It seemed to attach okay.
I then repeated my test (login as user). I was disappointed that my breakpoint didn't get hit in the source I'd attached, but I noticed the first and last name were assigned correctly. Checking the roles assigned to the test user showed me the role was also assigned.
Thinking the data was left over from a previous test, I deleted the user from the role, then deleted the user, logged out, and repeated the test. Again, it logged the test user on with the correct first and last names, and assigned it to the test role. Hooray!
I've since confirmed that removing the user from groups in Active Directory causes the provider to correctly synchronise when they log on (i.e., the user is removed from the role in DNN). So it looks like everything is working correctly!
Incidentally, I can now attach the source to IIS and hit my breakpoints. I had to manually copy the compiled DLL to the website folder before this would work.
Summary
Given that no code changes were required to get the provider working again, I can only think of three reasons why it wasn't working before:
- PEBCAK - Did I have the wrong version of the provider installed? It's unlikely, but it's possible.
- Provider install/uninstall issues. I previously had beta 1.01.03 installed. I uninstalled it before installing the 1.01.04 beta. While the install messages and version number in the packages table indicated it had installed, the problem persisted. It wasn't until compiling the provider source on my own machine that the problem corrected itself, without code changes. I think this points towards a DNN environmental / database configuration synchronisation issue on my machine. Given I have a brand new PC with a virtually vanilla version of DNN on it, the only place I can consider this occurring is the provider install/uninstall.
- The provider configuration itself may be bad. I think this highly unlikely, but it may have something to do with #2.
Because I can no longer get it to fail, I unfortunately can't help anyone else having this issue other than to say it looks to be a DNN environmental issue. The only advice I can give is to compile the DNN source with the provider source on your development machine and synchronise your website folder. It certainly doesn't seem to be a problem with the provider itself.
Carl.