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

  • Home
  • SEARCH
  • 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 61237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:17:15+00:00 2026-05-10T18:17:15+00:00

I need to create a custom membership user and provider for an ASP.NET mvc

  • 0

I need to create a custom membership user and provider for an ASP.NET mvc app and I’m looking to use TDD. I have created a User class which inherits from the MembershipUser class, but when I try to test it I get an error that I can’t figure out. How do I give it a valid provider name? Do I just need to add it to web.config? But I’m not even testing the web app at this point.

[failure] UserTests.SetUp.UserShouldHaveMembershipUserProperties TestCase ‘UserTests.SetUp.UserShouldHaveMembershipUserProperties’ failed: The membership provider name specified is invalid. Parameter name: providerName System.ArgumentException Message: The membership provider name specified is invalid. Parameter name: providerName Source: System.Web

  • 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. 2026-05-10T18:17:16+00:00Added an answer on May 10, 2026 at 6:17 pm

    The configuration to add to your unit test project configuration file would look something like this:

      <connectionStrings>      <remove name='LocalSqlServer'/>      <add name='LocalSqlServer' connectionString='<connection string>' providerName='System.Data.SqlClient'/>   </connectionStrings>   <system.web>      <membership defaultProvider='provider'>        <providers>          <add name='provider' applicationName='MyApp' type='System.Web.Security.SqlMembershipProvider' connectionStringName='LocalSqlServer' minRequiredPasswordLength='6' minRequiredNonalphanumericCharacters='0' requiresQuestionAndAnswer='false' maxInvalidPasswordAttempts='3' passwordAttemptWindow='15'/>        </providers>      </membership>   </system.web> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an asp.net mvc application and have created my custom user database
I've had to create a custom membership provider for my current ASP .Net project
I have an ASP.NET MVC application where I need to allow to customers configure
I have developed MVC web app. Now, I want to use custom form authentication
I need to slightly tweak the functionality of the ASP.NET Membership provider to add
Why do we need to create custom exceptions in .NET?
I want to add custom columns to some tables created by ASP.NET. For example;
I have a use case where I need to add information about the user
I have a ASP.NET MVC site with a CAS server set up as the
I'm working on an Asp.Net MVC4 site and I wanted to create a 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.