Jump to content

  •  

  • iBotModz CBox


    Photo

    Beta Log In system in Csharp


    • Please log in to reply
    2 replies to this topic

    #1 iTzoODavidOo

    iTzoODavidOo

      Sergeant Grade 2

    • Members+

    • 353 posts
    • Joined: 03-December 08
    • Gender:Male
    • Location:Manchester England

    Posted 18 October 2009 - 06:03 AM

    Hey, im making my own app but i need to now how to make it so Beta testers can type there password in and it will allow them to do stuff within the app.

    How do i do it?

    #2 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 18 October 2009 - 06:22 AM

    Well a non very secure way but will work, just make a txt document on a server and put the password in there. Then do a textbox and download the string from the txt file then

    if (textBox1.Text == downloadString)
    { //pass
    }
    else
    {
    //fail
    }


    #3 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08
    • Gender:Male
    • Location:Canada, ON

    Posted 18 October 2009 - 02:31 PM

    Local Login
    string password = txtPassword.Text;
    
    if (password == "beta_tester999") {
        //Execute Code
    } else {
        //Show Error
    }

    Remote Login
    string password = txtPassword.Text;
    string rcPassword = default(string)
    
    try {
        rcPassword = new System.Net.WebClient().DownloadString("http://domain.com/rcpass.txt");
    } catch {
        //Show (Connection) Error
        return;
    }
    
    if (password == rcPassword) {
        //Execute Code
    } else {
        //Show Error
    }