Click here to Skip to main content
13,196,730 members (78,541 online)
Rate this:
Please Sign up or sign in to vote.
I wish to create a application before we use the application . It should ask for username password . How to create it . A tutorial or thoughts would help
Posted 4-Aug-11 1:33am
Member 8575288 17-Jan-12 15:37pm
i want to create a website that allows users to log in, create new members and change password of d user.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You don't need an application to start an application. Just create a form, set as the default form, to asks for crendentials, authenticates against whatever crendential store you are using, and redirects to the main application page.

What have you tried so far? You need to show a little more initiative than this.

If you don't have a database configured you can use this[^] Although it is mainly for ASP.NET, it can be used for any application. The SqlMembershipProvider[^] can handle your authentication.
steven8Gerrard 4-Aug-11 8:20am
Created a login page using XML. But i wish to create a login where four different users can login . Say user1 has access to all features whereas user2 has limited features stuffs like that . Created a login page using xml.
Mark Nischalke 4-Aug-11 8:30am
What does XML have to do with this? Does your crendential store also provide role management? You limit feature availability by using roles.
Praveen Kullu 4-Aug-11 10:17am
Are you storing user names and passwords in an XML file?
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

I won't suggest you to store names and password in xml file,since it can be easily changed by anyone.

For WinForms, here is my solution. If you have learnt Sql Server or any other RDBMS language, then:
1.Create a table in database.
2.The table will store username and password in it.

Now create a Winform. Add 2 textboxes and a button to form. Make the form primary form. In the form properties, set,
1. StartPosition = CenterScreen.
2. ShowInTaskbar = False
3. FormBorderStyle = none

The textboxes will ask for username and password. In the event for button_click, the username and password will be checked in the table.(If you have learnt SQlServer or any other RDBMS language, you will know how to check).
Only when the user name and password match, the form asking for username and password will be closed, and new form which you want to show, will be visible.

If you are still unclear about anything, then ask again.
Mark Nischalke 4-Aug-11 11:25am
There is already a database available, no need to create one
Praveen Kullu 4-Aug-11 11:53am
Obviously i didn't knew that. But how tough is creating a table?
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Probably this article will help: ASP.NET Forms Authentication - Part 1
In other words:
1. You should configure web app to use forms authentication;
2. You should check crentials and set auth token for user if all is correct;
You could use your custom logic & design or use login control. In most complex case you even could create custom membership provider.
Mark Nischalke 4-Aug-11 10:13am
This is not a web app. Doesn't anyone read the question or tags?
VetalRMP 4-Aug-11 10:34am
You didn't specified type of your app. Login form is mostly used in web applications. Have you any particular problems with this task? If not then just separate your athentication logic from view (form), implement authentication logic and form itself.
Mark Nischalke 4-Aug-11 10:47am
Look at the TAGS under the question title. It was specified.

Login forms are not just for web applications.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171019.1 | Last Updated 4 Aug 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100