Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8415279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:24:00+00:00 2026-06-10T01:24:00+00:00

I am writing an application which uses WCF in order to communicate with Web

  • 0

I am writing an application which uses WCF in order to communicate with Web Services. A database is also used to store user-related data, such as credentials. The passwords in the DB are hashed + salted.

The user has to manually login using a username and password, which is provided to him. The application then uses a proxy in order to communicate with the Web Service in charge of the authentication. The Web Service then checks if the user exists and returns data to the client, which then displays the data. Otherwise, an error is shown if the credentials are invalid or the server unreachable.

My questions:

  • In order to reduce the amount of work done by the Web Services, I wanted the authentication process to be done by the client. In other words, The client sends a username to the Web Service, which then checks in the database if an entry exists for that username in the “Users” table exists. If it does, the Web Service returns the hashed and salted password (from the DB) to the client. The client then compares the password entered by the user with the hashed/salted password obtained. No decryption is done, the entered password is just hashed using the same salt bytes and the passwords compared.

    Is this acceptable behavior ?

  • How should I proceed if the provided username is not found in the DB ? Should the server throw an exception, which is then handled by the client ? Or should I divide the authentication part in two steps:

    1) Make sure the user exists.

    2) Fetch the encrypted password from the DB.

    The first step would then return a certain value which is understood by the client as meaning “the user does not exist” (ex: boolean value “False”).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:24:01+00:00Added an answer on June 10, 2026 at 1:24 am

    My main objection to your approach would be that you want to let the client make the decision about whether he’s authenticated or not.

    Don’t do that!

    Because in that case, any malicious attacker could just always declare himself authenticated (just basically ignoring the response from the server to the first call) and then access your system!

    The decision about whether or not a client knocking on your door should be let in or not must remain in your hands – e.g. that’s something you absolutely must do on the backend / on the server end.

    Never let the client make that decision!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a web application in Rails which uses sqlite. I want the user
I am writing an application which uses web services to connect a remote server.I
I'm writing a PHP application which uses a number of SOAP web services to
I am writing an application in C which uses both user defined satically linked
I am writing a web application which uses YUI3 for all it's JS needs.
I'm writing an application in Delphi which uses an SQLite3 database. I'd like to
I'm writing an application which uses sshj library for SSH connections. User opens Connect
I am writing a java application which invokes a web service and uses its
I'm currently writing a web application which uses forms and PHP $_POST data (so
I am writing an android application which uses C2DM. When a user sends some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.