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

  • Home
  • SEARCH
  • 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 8041967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:24:26+00:00 2026-06-05T04:24:26+00:00

Here is the situation: C# Windows Forms application ASP.NET web application Both authenticate with

  • 0

Here is the situation:

  • C# Windows Forms application
  • ASP.NET web application
  • Both authenticate with a custom user table in the same database (usename/password) and create a User object that is used throughout both applications

A user is logged into the Windows Forms application and we want to launch a URL to open a page in the ASP.NET web application in the default browser (IE, Chrome, Firefox, etc.). We want to pass the current username/password from the Windows Forms application to the ASP.NET web application in order to keep the user from having to log into the web application separately.

Based on our research, here are some options we have found (and the drawbacks):

  • Pass username/password in URL as QueryStrings and create the User object in the web application
    • Not secure (password visible in URL)
  • Create a temporary HTML page on the client machine that includes a JavaScript OnLoad function that POSTs username/password to the target URL and create the User object in the web application
    • (Could not find a way to POST data directly to a URL and display URL in default browser using C#)
    • Not secure (password visible in temporary page)
  • Create a “Handoff” table to store username/password with a key that gets passed to the page via QueryString and deleted from the table when the page loads and create the User object in the web application
    • Small potential for key to be intercepted (hackers)
  • Have a separate MongoDB that stores the User object and retrieve it in the web application
    • Separate software (MongoDB) running – additional point of failure

All of this is so that the user doesn’t have to type their username/password twice to log into both applications.

Which one of the above options above would work best (most secure, least overhead/maintenance)?

OR

Is there a way to create a Forms Authentication ticket (cookie?) in the C# application that could be used by the default browser?

OR

Is there a better, secure method for handling this?

(edit)

OR

Is there a good argument for requiring the user to enter the username/password again to access the web application if they’re already authenticated from the Windows Forms application? If so, can you provide links to references? Best practices, web security standards, etc.

  • 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-05T04:24:27+00:00Added an answer on June 5, 2026 at 4:24 am

    You could salt+MD5 the password and send it simply with the URL.

    However, you should point to a script on the server first, which authenticates the user and creates the appropriate cookies, and redirects to the desired page, now without the credentials in the URL.

    edited: or basically do whatever you want to preserve the users’ session

    Unfortunately, as long as passwords are involved, you can’t be 100% secure. Still, hashing a salted (salting is when you concatenate the password with some other string before hashing) password might be your best bet if somebody can get a visual on the passwords.

    1. You generate the password hash, with salt.
    2. You send it to be processed (I usually just put it into the URL of a separate script, but it’s a matter of preference.)
    3. You generate a hash with the same salt on the server and check it against the submitted one.
    4. Authenticate the user and redirect to the original location.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my situation, i've got a couple applications: - web site using .net cms
Here the Situation . I am having 2 million records in table . Just
Here's the situation: I would like to iterate through a table with input controls,
Here's the situation. Due to the design of the database I have to work
I'm upgrading an ASP.NET 4.0 app from: Windows Server 2003 and IIS 6 to:
Hi can I'm very new to windows forms. Here I want to maintain state
Here's the situation: I have a custom TextBox control that contains multiple other TextBox
Here's the situation: I've got .bat file that is being started by windows scheduler
Here's my situation. I've just started a new job and I've inherited an application
Here is the scenerio: On application open the user is asked to open a

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.