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 721099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:50:05+00:00 2026-05-14T05:50:05+00:00

I have an C# asp.net app using the default Sql MembershipProvider. My web.config has

  • 0

I have an C# asp.net app using the default Sql MembershipProvider. My web.config has a few settings that control how I’m using this Provider:

enablePasswordRetrieval="false" 
enablePasswordReset="true"
requiresUniqueEmail="true"
passwordFormat="Hashed" 
minRequiredPasswordLength="5" 

The problem I’m running into is that when people reset their passwords, it seems the ResetPassword() method returns a password that is longer than I want and has characters that can be confusing (l,1,i,I,0,O). Furthermore, I’m sending my users an email with a plain-text message and an HTML message (I’m using MailMessage with AlternateViews). If the password has unsafe HTML characters in it, when the email clients render the HTML text the password might be different (e.g. the %, &, and < aren’t exactly HTML safe).

I’ve looked over the “add” element that belongs in the web.config, but I don’t see any extra configuration properties to only include certain characters in the ResetPassword() method and to limit the password length.

Can I configure the ResetPassword() method to limit the password length and limit the character set it is choosing from?

Right now I have a workaround: I call ResetPassword() to make sure the supplied answer is correct, and then I use a RandomPassword generator I downloaded off the internet to generate a password that I like (without ambiguous characters, HTML safe, and only 8 characters long) and then I call ChangePassword() to change the user’s password after I’ve already reset it.

My workaround seems kludgy and I thought it would be better to configure ResetPassword() to do what I want.

Thank you~!

ColoradoTechie

  • 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-14T05:50:06+00:00Added an answer on May 14, 2026 at 5:50 am

    I don’t believe you can do anything to “configure” the ResetPassword() call. You could write your own provider that changes how the ResetPassword() works.

    This link describes the same tactic you seem to be doing already….

    Staying with your work around/hack may be the simplest way to go. 🙂

    However, if you want to learn more on how to create your own provider check out these links.

    http://www.asp.net/learn/videos/video-189.aspx

    http://msdn.microsoft.com/en-us/library/f1kyba5e.aspx

    http://www.devx.com/asp/Article/29256/0/page/3

    http://www.15seconds.com/issue/050216.htm

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

Sidebar

Related Questions

I have an ASP.NET 4 Web Forms app that is using URL Routing. I
I have an ASP.NET app that sits on our intranet, using the WindowsIdentity to
I have an ASP.NET(2.0 using C#) web app, in which I have a gridview.
I'm using VS2010,C# to develop an automation site (ASP.NET web app) which may have
I have an ASP.NET app where Im using SQL Session State. My application gets
I am building an asp.net MVC2 web app using StructureMap. I have created a
I have a basic app using the ASP.NET membership provider. By default, you can
I have an ASP.NET web app and it's using 5GB memory running on 64bit
I'm using the jquery dialog in my ASP.net web app. Within it I have
I have an ASP.Net-MVC app using LinqToSql. I have a subcontracts table, a service_lines

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.