How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask TheDoctor Your Own Question
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience:  M.S. in Internet Information Systems
Type Your Homework Question Here...
TheDoctor is online now
A new question is answered every 9 seconds

I need an ASP.NET code for creating a log in page with username

This answer was rated:

I need an ASP.NET code for creating a log in page with username and password XXXXX a security feature that would lock the account after 3 unsuccessful attempts at logging in and give the user the option the retrieve the username and/or password XXXXX an email address given during registration. Can I get this code written for me here?
Hello and thank you for using JustAnswer. It would be my pleasure to assist you.

Do you already have a project created? I assume by "SQL Built In", you mean that you are using an SQL Server Compact Local File?

Can you please send me your project? Zip up the entire project directory (I must receive everything, including the SLN file). Then upload the zip file to

Once uploaded, you will be given a link on the right. Click on the 'Copy Link' option and then paste it here.

Also, please let me know by when you need this.

Thank you
Customer: replied 4 years ago. <- Here is the link, I hope I did everything right, I compressed the entire project and uploaded it. I need this by next monday, hoping I can have it by sometime this weekend so I can test it out and everything

Thank you.

I will contact you once this is complete.
Hello again!

You can download the project here:


All of the code to accomplish your login / account locking / forgot password XXXXX been implemented.

This functionality uses SMTP to send emails. Now, when you run this kind of a project locally, the email will not send out. That is because your local computer is not an SMTP server. If you were to publish the web site to an actual web server, it would work just fine. But attempting to test locally prevents you from seeing the emails.

There is, however, an excellent way to test the email functionality. Go here and download the Test Mail Server Tool.

Once you download it, go ahead and install it. Once it is installed, run it. Do not change any of the settings. Just let it run in the background.

What this tool does is it listens for attempts to send out email messages. Usually, when you run a development program on your computer locally for testing purposes, the program will attempt to send out an email message. Because you have no email server running, the message simply dies and/or throws an error in the application stating that it could not connect to an SMTP server.

With this tool, those messages are intercepted and the email is opened up on your computer automatically in your system's default email program (e.g., Outlook, Windows Live Mail).

It is an excellent tool and you definitely want to run it.

Now for the functionality:

Attempt to log on as username tester password boo

This will let you know that your login is incorrect. Attempt again. Now again. At this point, the test mail server tool will pull up an email telling you that your account has been locked. It will also give you a special code for unlocking your account.

No go back to the login page and try to log in again with the bad login information. Notice that it now tells you that your account has been locked.

As well as tell you that your account has been locked, a new link is displayed for unlocking your account. Click on the link.

On this page, enter some random information into the form fields. Notice that it tells you that it is not valid unlock information. Now, but in tester and the code from the email message.

When you put in the correct code, you are redirected back to the login page.

Now, assume that you do not know what the correct password XXXXX tester is. Try clicking on "Forgot Password". If you didn't put anything into the form, it will ask you to enter a username. Enter your username tester and click on "Forgot Password" again.

This time, a new email message is displayed. This email message is sent to the email of the client account. It tells you what the correct password XXXXX: test

Now, log on with tester and test

This sets a session variable and directs you to the items page, which appears to not currently have anything on it.

But that's it for the log in. All of the functionality that you requested has been accomplished.

I wanted to further demonstrate the functionality to you, in case my description was not clear enough. I also wanted you to see that it is fully functional. You can view a screencast of the working project here:

As you can see, it all works and works well. Make sure you get that test mail server tool. It is extremely useful for all kinds of development work (.NET, PHP, JSP, Ruby on Rails, etc.).

Let me know if you have any questions at all. I'm here to help.

If you ever require assistance in the future with anything development or database related, please feel free to request me directly by starting your questions with **For TheDoctor**. It would be my pleasure to assist you again.

Please remember to rate my answer. It is greatly appreciated. Thank you so much and have a wonderful day!
Customer: replied 4 years ago.
Hello, It looks excellent, I have a slight problem however but it was a mistake on my end. I sent you a prior version and I can't access the DB in that version, the program gives me an error. But I did integrated what you did for me with my newest version but the account does not lock, can you debug or just simple fix this version so that it does what the previous one did, I believe it is a simple fix but I am stomped, I will add an extra $40
Hello again,

You will need to send me this other version with the correct DB. Go head and zip i up and upload it to"

Then send me the download link. I will gladly take a look at it for you.

Thank you
Customer: replied 4 years ago.
Here is a link with the correct version.
Hello again,

Here is the project:


It work just like the original screencast that I sent you.

Let me know if you have any other questions.

Please remember to rate my answer. Thank you again.
Hello again!

Are you still having issues with this? The new files that you sent me did not have any of the code that I wrote in them. I spent a huge amount of time work on this, and then another hour reworking the second copy.

The changes obviously require changes to the database, not just code changes. There has to be a way to keep track of the number of unsuccessful attempts to log in. In both copies that I sent you, it included the modified database. This includes two new fields in the login table.

Please let me know if you have any other questions, and please remember to rate my answer. Thank you again.
Customer: replied 4 years ago.
Yeah, sorry I did not reply again sooner. I am actually having a problem using the file, I am getting an error message about the DB. My error reads.

"The database
C:\Users\Kris\Documents\2013-06-08_033240_KISKADEEICELOGIN\KISKADEEICE\APP_Data\ICEDB.MDF" cannot be opened because it is version 661. This server supports version 655 and earlier. A downgrade path is not supported.
Could not open new database
'C:\Users\Kris\Documents\2013-06-08_033240_Kiskadeeicelogin\KiskadeeIce\App_Data\iceDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Can you tell me what I am doing wrong or what I should update to fix this problem?

You need to spend $3 to view this post. Add Funds to your account and buy credits.
TheDoctor and 2 other Homework Specialists are ready to help you