Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4596204
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:04:54+00:00 2026-05-21T23:04:54+00:00

I have a custom asp.net membership class I am building where I have a

  • 0

I have a custom asp.net membership class I am building where I have a helper function that the
GetUser() method uses to convert the values from my database into a System.Web.Security.MembershipUser object.

private MembershipUser _converToMembershipUser(MembershipDBModel member)
    {

        System.Web.Security.MembershipUser membershipUser = new System.Web.Security.MembershipUser(
        this.Name,
        member.UserName,
        member.UserID.ToString(),
        member.Email,
        member.PasswordQuestion,
        member.Comment,
        member.IsApproved,
        member.IsLockedOut,
        member.CreationDate,
        member.LastLoginDate,
        member.LastActivityDate,
        member.LastPasswordChangedDate,
        member.LastLockedOutDate);

        return membershipUser;
    }

This is the error that I keep getting when the above method is being called. I have not idea how to get around this so any suggestion is very welcome.


System.IO.FileLoadException was caught

Message=The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

  Source=System.Web

  StackTrace:

       at System.Web.Security.Membership.Initialize()

       at System.Web.Security.MembershipAdapter.get_Providers()

       at System.Web.Security.MembershipUser..ctor(String providerName, String name, Object providerUserKey, String email, String passwordQuestion, String comment, Boolean isApproved, Boolean isLockedOut, DateTime creationDate, DateTime lastLoginDate, DateTime lastActivityDate, DateTime lastPasswordChangedDate, DateTime lastLockoutDate)

       at TMTechMembershipProvider.MembershipProvider._converToMembershipUser(MembershipDBModel member) in d:\Visual Studio 2010\Projects\TMTechMembershipProvider\TMTechMembershipProvider\TMTechMembershipProvider.cs:line 1005

       at TMTechMembershipProvider.MembershipProvider.GetUser(String username) in d:\Visual Studio 2010\Projects\TMTechMembershipProvider\TMTechMembershipProvider\TMTechMembershipProvider.cs:line 965

       at TMTechMembershipProvider.MembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) in d:\Visual Studio 2010\Projects\TMTechMembershipProvider\TMTechMembershipProvider\TMTechMembershipProvider.cs:line 435
  InnerException: 


 System.Web.Security.MembershipAdapter.get_Providers() Initialize() The given assembly name or codebase was invalid.

config file

<?xml version="1.0"?>
<configuration>
  <appSettings></appSettings>

  <connectionStrings>
    <add name="MembershipDBContext" providerName="System.Data.SqlServerCe.4.0" connectionString="data source=MembershipDBContext.sdf"/>
  </connectionStrings>

  <system.web>
    <membership>
      <providers>
        <!--<remove name="AspNetSqlMembershipProvider"/>
        <add name="AspNetSqlMembershipProvider" type="TMTechMembershipProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cbae438f5bab0724" connectionStringName="MembershipDBContext" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="MyUnitTests" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>-->
        <clear/>
        <!--<add name="TMTechMembershipProvider.MembershipProvider" type="TMTechMembershipProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cbae438f5bab0724" connectionStringName="MembershipDBContext" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="MyUnitTests" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>-->
        <add name="TMTechMembershipProvider" 
             type="TMTechMembershipProvider.TempMembershipProvider" 
             connectionStringName="MembershipDBContext" 
             enablePasswordRetrieval="true" 
             enablePasswordReset="true" 
             requiresQuestionAndAnswer="true" 
             applicationName="MyUnitTests" 
             requiresUniqueEmail="true" 
             passwordFormat="Hashed" 
             maxInvalidPasswordAttempts="5" 
             minRequiredPasswordLength="6" 
             minRequiredNonalphanumericCharacters="1" 
             passwordAttemptWindow="10" 
             passwordStrengthRegularExpression=""/>
      </providers>
    </membership>

    <machineKey validationKey="EAA358B778400490DE16A414AC2144C740874D426214CA81D8265354535ACCA9C0238D5C20021D4335DBE1171F31C02F0AB8ADD5B1EE2A6E07CC768F04B20F30" decryptionKey="AF622C5C9796D67DEB876483F1341E3708CA056B1EB031CEAD6FD7CBD0F13A50" validation="SHA1" decryption="AES"/>

  </system.web>


  <!--<system.web>
    <membership>
      <providers>
        <remove name="AspNetSqlMembershipProvider"/>
        <add name="AspNetSqlMembershipProvider"
             type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
             connectionStringName="LocalSqlServer"
             enablePasswordRetrieval="false"
             enablePasswordReset="true"
             requiresQuestionAndAnswer="false"
             applicationName="/"
             requiresUniqueEmail="false"
             passwordFormat="Hashed"
             maxInvalidPasswordAttempts="5"
             minRequiredPasswordLength="1"
             minRequiredNonalphanumericCharacters="0"
             passwordAttemptWindow="10"
             passwordStrengthRegularExpression="" />
      </providers>
    </membership>
  </system.web>-->
  <startup>
    <!--<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>-->
  </startup>
</configuration>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:04:55+00:00Added an answer on May 21, 2026 at 11:04 pm

    Error: “The given assembly name or codebase was invalid”

    Your type attribute:

    type="TMTechMembershipProvider.TempMembershipProvider" 
    

    Your type attribute in your commented line:

    type="TMTechMembershipProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cbae438f5bab0724"
    

    Your comment:

    i tend to agree but this is needle in haystack. This is what I thought the Fusion Log Viewer was for to help identify what is failing to load.

    sry, but lol 🙂


    Update 1: re the comment:

    Just found it funny, couldn’t resist. Meant no harm and was not imply anything with it, we’ve all been there.

    Now on a more serious note, it still seems an issue with specifically that line.

    Let’s compare it with the type line of the asp.net provider:

    type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    
    [Provider class (including the namespace)], [dll], [Version], ...
    

    It seems you are missing either the class or the dll. Hoping that solves it, good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an ASP.NET MVC applicaiton that will have custom role and membership providers.
I have an ASP.NET application that uses a custom .NET library (a .DLL file).
I am creating custom membership provider for my asp.net application. I have also created
I have a custom memebership provider that has served us well for asp.net web
I have a custom Asp.net control as public class ImageControl : Panel { private
I have a asp.net webpage that contain a custom login control like this: <div
i have an ASP.NET web service that returning a custom entity object (Staff): [WebMethod]
I have two web applications that implements a asp.net membership provider. It is a
I am currently building a custom Membership Provider for my Asp.net MVC website. I
I don't want to have the security question and answer feature that ASP.Net Membership

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.