Re: Custom Membership Provider: 'Could not load type' Error

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Feb 6, 2:39 pm, "Kirk" <lok...@xxxxxxxxxxx> wrote:
I followed the procedure at this site (http://www.devx.com/asp/Article/
29256/0/page/1) to create a custom membership provider on a ASP.NET
Web Site. However, when I try this same method on a ASP.NET Web
Application (WAP), I get a "Could not load type MyMembershipProvider"
error. My web.config file looks like this:

<membership defaultProvider="MyMembershipProvider" >
<providers>
<add name="MyMembershipProvider"
type="MyMembershipProvider"
requiresQuestionAndAnswer="true"
connectionString="Data Source=TAL-LT-KARLR;Initial
Catalog=WebReports;Integrated Security=True"/>
</providers>

And the start of my class looks like this:

Public Class MyMembershipProvider
Inherits MembershipProvider

Public Overrides Property ApplicationName() As String
Etc....

Do I have to create some specific folder for my
MyMembershipProvider.VB file to reside? Or do I need to add some
specific reference within the project?
I would greatly appreciate any suggestions or comments anyone could
give me. Thank you!

Just wanted to post the solution to my own question in case someone
ran accross this later.

I read this obscure MSDN article, which states "In order to use the
sample provider, you can place your source code in the App_Code
directory of your application."
http://msdn2.microsoft.com/en-us/library/44w5aswa.aspx


So I created a folder called "App_Code", and placed my
MyMembershipProvider.VB file in it and VOILA! A working WAP CMP.
(Well, technically not VOILA, as this took me some time to find).
Maybe this is common knowledge to other developers, but this was
extremely frustrating for me. No other post, article or sample
explained this "minor" detail. Sigh.

.



Relevant Pages

  • RE: Monitoring and Reporting after SBS SP1
    ... This provider will be run using the LocalSystem ... > It's interesting that you mentioned WSUS. ... Checked the Default Web Site in IIS and found the internal IP address ... I don't see any issues in the event log. ...
    (microsoft.public.windows.server.sbs)
  • Re: Outlook with Outlook Express?
    ... Zimbra offers both POP and IMAP service. ... Some very nice things are said about Zimbra as an IMAP provider. ... Can/should Zimbra handle my mail on my Web site? ... So, although it's true that you can't do E-mail without an ISP, ...
    (microsoft.public.windows.vista.general)
  • Re: info
    ... At the begining of September I'll be moving to England. ... I looked at BT web site but I can't understand their ... I don't want to use any router/hub from the provider but mine. ...
    (uk.telecom.broadband)
  • RE: For subdomains and windows hosting
    ... There seems to be a web host provider for every web site in existence these ... The best way to pick a hosting provider is to first research what ... then start comparing features and prices. ...
    (microsoft.public.frontpage.client)