Zum Hauptinhalt gehen

Problem registering custom membership provider

Kommentare

1 Kommentar

  • Berend Veldkamp

    It seems I was missing some of the basic concepts of Geocortex Identity Server: As far as I can see now, the Geocortex Identity Server uses only a single membership provider out of the list of providers configured in membership.config. This provider should be declared as the 'defaultProvider' in the membership tag. Some providers come with the installation, e.g. the legacy XML provider and the Active Directory Provider. It is possible to add your own provider to the list and use it, just copy the assembly to the Web\bin folder.

    Some notes that may be of help to others:

    • On the Security | Providers page in the manager, the Geocortex Identity Server should be enabled.
    • Unlike me, do not try to use Geocortex.Logging anywhere in a custom membership provider. That assembly is not included with the Identity Server, so things will fail with no clear identification of what goes wrong.
    • Inside the ValidateUser method, use a big fat try-catch and log any error messages somewhere. This will help a lot to figure out what exactly goes wrong on a server. I'm not sure what the cleanest options is, for debugging purposes I now just use File.AppendAllText() to a file in a temporary folder, but I'm sure better methods exist.
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.