Results 1 to 3 of 3

Thread: Having trouble with logic on custom log in system

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2013
    Posts
    56

    Question Having trouble with logic on custom log in system

    Alright so, I have a program that reveals sensitive data (such as other members user names and passwords for certain things, and all relevant information needed as well as contacts etc... Kind of like a unsecured facebook account thats shared with every member of this team, or like a large data source) -- This program is to help the members of my team pretty much grab any data they need, and then I am able to update (add/remove) data whenever from the program.

    However... Because this data is so sensitive, I wanted to create a "log in" system, where members can create accounts, and ofcourse change their e-mail they registered with, their profile picture, password, etc... All the stuff you could normally do with a "account".

    Iv gotten as far as having a log in screen, and it asks for a username and password, it will then look at a hidden database for this username, if it finds it, it will then look at the same hidden database and see if the password matches, if one or the other do not match, it will not log you in, if it does, it will.

    Now... Ontop of this, users can also create multiple accounts under their 1 main account, kind of like Google now lets you do.

    The issue is my database... Im not exactly sure how it all works...
    If there is an alternative, please let me know.

    But, my issue is:
    I can get it to look at the database and do the checks even as far as check the display pictures if it matches the account (to detect if there is a hacker on the account), and even match log data and IP (again, for hack reasons)... But... The data never saves...
    I can go into the database and manually add an "account" (username, password, display picture, access level,e-mail,etc,etc...) and then save it, and leave the program, re-load it, and its there. Ok... But....
    If it wasnt me, lets say "Bob" from another computer tries to log on and he cant, and I just added his account, and he has the same version of the program as me, his data will infact NOT be in the database... And if I go to check the database again, no data will be in the database.

    So... How would I "Permanently" save the data to stay in the database?
    Also, how would I make this data be accessible for every member? Logically, it doesnt make sense to me.
    If I added "Bob"'s account to the database, on "Dibbies PC" and Bob tries to log on on "Bob's Work space" he wont be able to right? Because the data is on Dibbie's PC, not Bob's Work space, so how would I be able to make this database kind of like... Global? Would be the term? Like Bobs workspace can see and access the same data as Dibbies PC can.

    I know this gets into networking, and I have a feeling some complicated coding, but again, if there is an easier way, please let me know. And I already tried using MySQL.

    I am using a datagridview ofcourse, and how it works is:
    It will quickly flash the gridview (because for whatever reason, it cant access the data if the gridview was never opened by the user), then it will use a for loop to go through every user in the database (I know its a bad idea, but theres only (including me) 26 members on this team, and that number is never going to grow)
    And find the exact username (case sensitive) from what they typed in "textbox1" and if it does find it, then it will see if the password also matches the one in "textbox2" Also case sensitive.

    After, it will load "Form1" which contains all the sensitive data, where it loads off of this database, so it will then after knowing the user, it will get the users display picture, how long they been logged in for, the last time they logged in from what machine (incase they used something like a library computer), log out options, password, background, music, and display picture change options, all the passwords and relevant info they will need (for example, the Google Plus account log in info, and info to change it, like the phone/cell number used, the birthday and security questions,etc...), and then they are even given options to launch programs relevant to their work (so they can just click a button that will open the internet for them, go to plus.google.com, and automatically log them in, and then go to the main page, or the groups/circles page, or whatever page they want it to go to by default, using a radio button selection, then clicking "Launch". So its a very... "Lazy" program.

    I know this is kind of complicated, and hard to explain, if you need any more information, let me know. If you need to actually speak to me, send me an e-mail.
    My e-mail: strongstrenth@hotmail.com

    Oh yeah, this "datagridview" is on Form2, which can only be accessed by users with a lvl 10 access level (so me, and "admins"), non-admin users never actually see or gain access to this screen. It is only used for them to pull data from, so only the computer itself sees the data contained on it.

    Theres a lot of code everywhere so I cant really show you the code, which complicates things, id have to send you the entire program, and the code itself contains a lot of sensitive data...

    If theres anything im missing, please let me know.

    Thank you for any help anyone can provide. And take your time with your replies, I have no rush on this program.

  2. #2
    PowerPoster kaliman79912's Avatar
    Join Date
    Jan 2009
    Location
    Ciudad Juarez, Chihuahua. Mexico
    Posts
    2,593

    Re: Having trouble with logic on custom log in system

    Hello Dibbie,

    First, I would recomend you post shorter versions of your problem, like we do not really need to know the whole purpose of the application. Just state where the problem is because many forum users will not bother to read such a large post.

    Attending your issues: Doing a network database is not rocket science but it is not an enchilada either. I would recommend looking into SQL Express, but you will need to fiddle with the ports and firewall to make every computer in the network aware of it, and able to use it.

    Once you do that, you will need a way to configure the connection string on the different computers, because even if you have a default that everyone may use, you should be able to change your server without much problems.

    On the persistance issue, it is a very common case, try looking into the table update and the bindingsource endEdit methods. And that is in the neighborhood of why you need to flash your DGV because you are not managing your tables and bindingSources in the right way.
    More important than the will to succeed, is the will to prepare for success.

    Please rate the posts, your comments are the fuel to keep helping people

  3. #3
    Hyperactive Member mbutler755's Avatar
    Join Date
    May 2008
    Location
    Peoria, AZ
    Posts
    417

    Re: Having trouble with logic on custom log in system

    As kaliman said, you will need to use a centrally located database. I would also recommend SQL Express because it's free and easy to use.

    Once you have your database installed and you can authenticate to it, you can begin to build your tables and the columns in those tables. You can use the designer inside of VS or you can build it using the SQL Server Management Studio. Either way is fine.

    You can use SQL Adapters to hook your datagridviews up and even have editing permissions right inside the DGV. Start by getting a database (or install it on the PC where visual studio is). If your connection string is in the resources instead of hard coded, it will be easy to change down the road when you move to a production database on an actual server.
    Regards,

    Matt Butler, MBA, BSIT/SE, MCBP
    Owner, Intense IT, LLC
    Find us on Facebook
    Follow us on Twitter
    Link up on LinkedIn
    mb (at) i2t.us

    CODE BANK SUBMISSIONS: Converting Images to Base64 and Back Again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width