Results 1 to 4 of 4

Thread: [RESOLVED] Hardcode Login

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    97

    Resolved [RESOLVED] Hardcode Login

    Hi,

    Is it safe to hard code username and password on backend code?

  2. #2
    Addicted Member
    Join Date
    Jul 2002
    Location
    Cleveland, Ohio
    Posts
    185

    Re: Hardcode Login

    it's really never a good idea to hard code user names and passwords anywhere in code, not only for security reasons, but your code will break if they ever change or are deleted. If you have to hard code something, I would use the Web.Config file and then encrypt that file when it's time for deployment. If you google web.config encryption you'll come up with an encyclopedia of stuff out there on how to do it.

    Jim P.
    "The Force will be with you, always."

    --Ben Kenobi--

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    97

    Re: Hardcode Login

    Thanks for the reply. Just thought it would be easier to do this rather than implementing a database just for login.

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Hardcode Login

    Hey,

    You don't have to implement a database if you don't need to. As mentioned, you can store a username and password combination in your web.config file, and then encrypt the section so that it is not human readable.

    If you provide more details about what exactly you are trying to achieve I am sure we can come up with a solution.

    Gary

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