0

Here is my class declaration:

public class XmlMembershipProvider : MembershipProvider
    {....}

and my web.config snipit:

<membership defaultProvider="CustomXmlMembershipProvider">
            <providers>
        <add name ="CustomXmlMembershipProvider" type="XmlMembershipProvider" xmlFilePath="App_Data\Userstore.xml"/> .....

I am not sure what to do from this point. I have done a ton of google searching but cannot find out why I am getting the following error:

Parser Error Message: Could not load type 'XmlMembershipProvider'.
shenn
  • 859
  • 4
  • 17
  • 47

2 Answers2

0

Only adding the reference to the assembly (as below) still gave errors, although it is a step in the right direction:

<add name="..." type="XmlMembershipprovider, MyAssembly" .../>

I found that the fully qualified reference to the assembly should ALSO be added as follows:

<add name="..." type="MyAssembly.XmlMembershipprovider, MyAssembly" .../>

Now it works.

Stanley
  • 5,261
  • 9
  • 38
  • 55
0

The type string should also include the assembly name that contains the XmlMembershipProvider.

 <add name="..." type="XmlMembershipprovider, MyAssembly" .../>
Richard Schneider
  • 34,944
  • 9
  • 57
  • 73
  • would this be located in the AssemblyInfo.cs file? I tried to do this but I got the following error: `Parser Error Message: Could not load type 'XmlMembershipProvider' from assembly 'CustomMembershipProvider'.` – shenn Jan 27 '12 at 02:26