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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:04:30+00:00 2026-06-03T17:04:30+00:00

I have a custom log in that returns an encrypted Token, which indicates that

  • 0

I have a custom log in that returns an encrypted Token, which indicates that a user is logged in. This Token is passed to another page(Dash.aspx) via QueryString.

Dash.aspx takes the token from the QueryString and posts it to a hidden field on the page.
Javascript reads that value and holds it in memory. That Token is then used to make web service calls. When these calls complete a new Token value is returned, and javascript stores that value (replacing the old one).

I want to add new pages for access after log in. These pages will need a valid Token passed to them. A user would move from Dash.aspx to one of these new pages and back (so just a few different links at the top of a Masterpage)

I don’t like passing the Token via QueryString. And I am not sure how to keep the Token updated where accessible on page change.
I want to avoid using Session to store and pass the Token if possible

How can I pass my Token more discreetly and make sure it always passes the most up to date value?

I realize this is a fairly broad question, but im at a loss. I feel like there is probably some pre built idea that will handle this, i just dont know what or how to use it.

Thanks

Update

So an example was asked for:

Step 1: User logs in – > zholen/zholen123

  • Service is called to validate username and password -> returns Token (‘ABC’)
  • Redirect to Page Dash.aspx?token=ABC

Step 2: Dash.aspx grabs token from querystring and assigns to hidden field on page

  • Javascript object grabs token from hidden field and stores internally
  • JS Object makes several async calls to various services, each service returns
    a new updated Token, internal token is updated with new value(Tokens expire every 30 min)

Desired new steps

Step 3: Move from Dash.aspx to Account.aspx

  • Account.aspx requires valid Token to load
  • Call more services and change Token

Step 4: Move from Account to Dash.aspx with up to date token


Service calls are made either via a Web Service(asmx) or through page methods depending whether the action desires a data return (asmx) or an html return(page method -> table prefilled with data) or on page load

Based on suggestion of Cookies, I think it would be possible to reset the cookie with the new token value during these calls on C# end, assuming that i could do that kind of thing from an ASMX and that the async of the whole thing wouldn’t cause issues.

Also I can make the JS object which internally stores an up to date token place that value back into the hidden field if that would help make it accessible from the C# end.

  • 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-03T17:04:33+00:00Added an answer on June 3, 2026 at 5:04 pm

    You could use cookies… You may want to use your intermediate encryption as cookies can be read externally.

            //c#
    
            HttpCookie cookie = new HttpCookie("myTokenCookie");
            cookie.Value = tokenString;
            Response.SetCookie(cookie);
    
            // then get it back later
            s = Request.Cookies["myTokenCookie"].Value;
    
            // then you could write it into a hidden input for retrieval in JS
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service that returns JSON to the clients. This is the
I have a custom AuthenticationProvider that simply returns the Authentication object for the authenticate
I have an Apache server that writes to a custom log file (through a
I have custom classes that I currently instantiate within App.xaml as resources. I want
I have custom event that has several different subscribers who will all use the
I have custom gallery. Gallery represents items that are frame layout. There are one
I have custom component that I can place in my layout file (XML) for
I have custom components which must adjust their text content based on space constraints.
I have a custom observer in Magento 1.6.2.0 that is called when a CMS
I want to show a dialog to the user that says this is going

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.