Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Membership doesn't work

Posted on 2009-12-18
6
Medium Priority
?
223 Views
Last Modified: 2013-12-17
Ugghh, I am so confused!!!

I took over this project for someone else.
There wasn't anything in the webconfig about  a defaultProvider.
The app for the most part worked fine, and I could get values from the Membership tables.
I am using the Forgot Your Password section now and would like to get the SuccessText and place it in the label? that it was successful.

I am able to reset the password and email it to myself.

So now I added the code below to the web.config and I get an error saying:
    "We were unable to access your information. Please try again."

If I remove the web.config section, It will at least let me login, etc... again.

I've tried AspNetSqlProvider, SqlProvider, different answers others have used, and I am stuck.
Thanks for anyone's help.

<authentication mode="Forms">
<forms loginUrl="~/login.aspx" defaultUrl="~/reports/Default.aspx"/>
</authentication>

    <membership defaultProvider="AspNetSqlProvider">
      <providers>
        <add name="AspNetSqlProvider"          
             type="System.Web.Security.SqlMembershipProvider"        
             connectionStringName="ConnStringNameInWebConfig"      
             requiresQuestionAndAnswer="false"        
             requiresUniqueEmail="true"        
             passwordFormat="Hashed"        
             minRequiredNonalphanumericCharacters="0"        
             minRequiredPasswordLength="8" />
      </providers>
    </membership>
0
Comment
Question by:purdyra1
  • 3
  • 3
6 Comments
 
LVL 41

Expert Comment

by:guru_sami
ID: 26084649
Are you able to login with any user or your membership is not working at all ?
0
 

Author Comment

by:purdyra1
ID: 26084701
I can login when I don't have the info in the web.config.  I am assuming that's becz it does some default stuff that I think I read about.
but once I put it in the web.config I get that error that I stated above.

  "We were unable to access your information. Please try again."

thank you for responding.
0
 
LVL 41

Expert Comment

by:guru_sami
ID: 26084732
yes....it is using default settings from the machine.config file. So check that.
If you are able to login using default settings ....aren't you able to do ForgotPassword work using default settings?
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Author Comment

by:purdyra1
ID: 26084827
yes, I can do the forgotpassword using defaultsettings.  it works fine.
but I wanted to change some of the settings.
here is what is in machine.config.
I am wondering, is it becz my machine.config points to LocalSqlServer?
doesn't web.config override machine.config?
becz my web.config connectionstring has a different name and points to a different db.  so how would i point to that db?

<membership>
  <providers>
     <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="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
  </providers>
</membership>

<profile>
 <providers>
  <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
 </providers>
</profile>
0
 
LVL 41

Accepted Solution

by:
guru_sami earned 500 total points
ID: 26084964
try adding this to your web.config and then try to login and reset password.

<membership defaultProvider="AspNetSqlMembershipProvider">
  <providers>
<clear />
     <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="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
  </providers>
</membership>

Also what exactly you want to change ?
0
 

Author Closing Comment

by:purdyra1
ID: 31667954
Ok, I understand it all better now.  Thank you for your help and quick response.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Suggested Courses
Course of the Month15 days, 23 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question