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 3675656
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:00:12+00:00 2026-05-19T03:00:12+00:00

I have a service (WCF) with which my ASP.NET page will communicate. The WCF

  • 0

I have a service (WCF) with which my ASP.NET page will communicate. The WCF service has hashed passwords in its data store (a file actually). The WCF service requires the username and the hashed password on every call.

Nowm the problem I’m encountering is that if I authenticate the user with forms authentication in ASP.NET, a cookie will be saved in the user’s computer after the user is authenticated but I would like to save the username and hashed password too so that the user may able to use the WCF service. Where should this information should be saved so that it is safe and secure?

Should I use session variables? If I choose that option that, then should I switch from forms-based authentication and manually authenticate using session variables or use both forms-based autentication for web page access and store the username and hashed password in a session variable? What are the pros and cons of each?

  • 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-05-19T03:00:12+00:00Added an answer on May 19, 2026 at 3:00 am

    Can you store the username and password (hashed of course) in another cookie? Each time you communicate, grab the cookie and send it along with the username to the WCF service.

    On the WCF service end you’ll have the username and the hashed username/password combo. If you apply the same hashing you should end up with the same string that you’ve got stored in the WCF end, if they match the user is valid.

    Regards to your edit:

    Not sure that there is a much of a distinction between them as you’re suggestion. If you use forms authentication a session variable is created and (assuming you’re using cookies) a cookie is stored that allows the session variable to be associated with the user. So even if use forms authentication you’re still using session variables.

    The only question really is if you want to store a hashed version of the password entered by the user in a session/cookie. The pro is that its being stored somewhere and that could potentially pose a security risk.

    A completely alternative approach is rather than sending the password and re-authentication upon each request, send an authentication token that doesn’t relate to the user’s password. Validate this token instead.

    The token could be issued upon successful login, and should use the same hashing algorithm as the WCF. Send the username and token as part of the request and validate that it is valid, authorised and still current.

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

Sidebar

Related Questions

I am creating a large ASP.NET 4 site which has a WCF service backend.
We have a .NET 3.5 WCF service hosted on IIS 6.0 which has a
I have a WCF REST service consumed in an ASP.Net site, from a page,
I have a WCF service which performs CRUD operation on my data model: Add,
Let's say I have a WCF service which has a method returning object Person.
I currently have a WCF Service Library which will be started through a Console
I have a WCF service in an ASP.NET AJAX app that is returning json.
I have an asp.net website which contains a Thread that fetches some data from
I have ASP.NET web apps and 1 wcf web service. I would like to
I have an Asp.Net application that calls some WCF service using a proxy generated

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.