Question

We have a vendor that provides a registration-type service for us. I have written code to access a web service they have exposed for us to authenticate users against their user database. I've used this code successfully in a couple of one-off applications, rolling my own authentication layer, but I would like to be able to integrate it the .net.

So I wrote custom membership and role providers for ASP.NET 2.0, using my existing code.

The membership and role providers are in the same dll that compiles with no errors. I dropped the dll into the bin folder of the website, and then I get constant error messages like "Cannot Load type" errors.

I need to know how to wire-up' the provider in the Web.Config file such that the dll is recognized by .net and the provider knows to use the proper code for authentication.

I've searched on the web, and find plenty of examples of custom membership providers, but I can't find much on the proper settings for the web.config file. Please help!

Class Declaration

namespace vendAuth
{
public class VendMembershipProvider:System.Web.Security.MembershipProvider                             { 

Web Config

 < compilation defaultLanguage="c#" debug="false" batch="false">

     <assemblies>
        <add assembly="MembershipProviderFromScratch,Version=1.0.0.0, culture=neutral, PublicKeyToken=15dd03ae5e78b530" /> 
     </assemblies>
 < /compilation>

 < membership defaultProvider="VendMembershipProvider" userIsOnlineTimeWindow="30">
    <providers>
<clear />
<add name="VendMembershipProvider"                                                                                
     type="VendAuth.VendMembershipProvider, 
     MembershipProviderFromScratch, Version=1.0.0.0, Culture=neutral,  PublicKeyToken=15da13ae5e78b530"
     connectionStringName="someDATA"
     enablePasswordRetrieval="false"
     enablePasswordReset="false"
     requiresQuestionAndAnswer="false"
     requiresUniqueEmail="false"
     passwordFormat="Hashed"
     maxInvalidPasswordAttempts="5"
     minRequiredPasswordLength="7"
     minRequiredNonalphanumericCharacters="1"
     passwordAttemptWindow="10"
     passwordStrengthRegularExpression=""
     applicationName="VendAUTH" 
     AuthConnectionString="Auth"/>

        </providers>
    </membership>

The website is running asp.net 2.0. We are using Umbraco as our CMS.

Edit

The custom DLL, residing in the ~/bin folder, is named MembershipProviderFromScratch.dll.

No correct solution

OTHER TIPS

According to your namespace, type should be like this -

<add name="VendMembershipProvider"
     type="VendAuth.VendMembershipProvider, VendAuth"
     connectionStringName="someDATA"
     ... />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top