Simple Authentication and registration process for a website through Membership schema


Posted Date:     Total Responses: 0    Posted By: dnyandeep   Member Level: Gold   Points/Cash: 30   


As you can see today many of websites and web application need authentication for using that service.
you can create your own such web service which authenticates and creates new user using any database language.But what happens sometimes by mistakes you may make some mistakes which may make a security flaw to your website.
To avoid it you can use Membership schema provided by asp.net.so that errors to be made by you becomes zero.

So lets start.

1.Configuring Your Web Application.
If you are using visual studio 2008 when you create new website web.config file is automatically created else create a new web.config file in your project.
Now in Menubar go to ASP.NET configuration.select the security tab,select authentication type link.Then you will see two options.
a)From Internet.
b)From Local Network.

Select "From Internet" and press done.
save all.

2.creating Webpages and coding.

The Authentication Code is like this

if (Membership.ValidateUser(Login1.UserName, Login1.Password))
{
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, Login1.UserName, DateTime.Now, DateTime.Now.AddMinutes(50), Login1.RememberMeSet, "demo");
string hashticket = FormsAuthentication.Encrypt(ticket);

HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, hashticket);
Response.Cookies.Add(cookie);

string returnUrl = Request.QueryString["ReturnUrl"];
if (returnUrl == null) returnUrl = "~/Default.aspx";

Response.Redirect(returnUrl);
}


Benifits of this method:Less Coding,More inbuilt Security Features.

Attachments

  • Authenticaiondemo (688-10031-Authenticationdemo.zip)

  • Project Feedbacks

    Author: Member Level: BronzeRevenue Score: 1 out of 5
    send ur documentation to my id: yashokreddy_4u@yahoo.co.in


    Author: Member Level: BronzeRevenue Score: 1 out of 5
    hi kunal..cud u send full documentation to basinth@rediffmail.com


    Author: Member Level: BronzeRevenue Score: 2 out of 52 out of 5
    hi....
    plz end this project to my email bcoz i hav to do my final year project...
    my email id is-->mailto_hasi@yahoo.com..send as soon as possible


    Author: Member Level: BronzeRevenue Score: 1 out of 5
    hi please send me the proj details so i can use some help from it thanks.


    Author: Member Level: BronzeRevenue Score: 1 out of 5
    srry my eamil is rahul.shah.4u@gmail.com



    Author: Member Level: BronzeRevenue Score: 1 out of 5
    hi please send me the proj details so i can use some help from it thanks.


    Author: Member Level: BronzeRevenue Score: 2 out of 52 out of 5
    hi please send me the proj documentation so i can use some help from it.ma Email is jazib_hussnainbutt@hotmail.com (thanks)


    Author: Member Level: BronzeRevenue Score: 1 out of 5
    thanks


    Author: Member Level: BronzeRevenue Score: 3 out of 53 out of 53 out of 5
    Hi, You have done a great job in doing this project... Nice work... Can you send me the documenation and files regarding this project.It will be helpful for me..Plz...
    My mailid lalithasombhotla@gmail.com

    Thanks
    Lalitha


    Author: Member Level: BronzeRevenue Score: 1 out of 5
    hi...pls send me this projects all documents..my id is: biplabdansena@gmail.com


    Author: Member Level: BronzeRevenue Score: 1 out of 5
    Can u send me your source code i would greatly appreciate it svc316@yahoo.com


    Author: Member Level: BronzeRevenue Score: 1 out of 5
    can u plz send me suggestion of my this task...plz find my attach ment


    project.doc
    Author: Member Level: SilverRevenue Score: 1 out of 5
    hi Please mail me the details of ur project.
    My id :-garimaa.agarwal@yahoo.in


    Author: Member Level: GoldRevenue Score: 2 out of 52 out of 5
    Hi,
    Its really nice. I would like learn such type of things.

    It will be greatful for me to send the files.

    Thanks Rakesh,
    Siva Sreenath


    Author: Member Level: GoldRevenue Score: 2 out of 52 out of 5
    Hi,
    Its really nice. I would like learn such type of things.

    It will be greatful for me to send the files.

    Thanks
    Siva Sreenath


    Post Feedback
    You must Sign In to post a feedback.
    Next Project: Library Management System
    Previous Project: online shopping portal

    Return to Project Index

    Post New Project


    Related Projects


    Top Contributors
    Today
      Last 7 Daysmore...

      Awards & Gifts

      Online Members

      Gaurav Aroraa
      More...
       
      Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India