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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:25:37+00:00 2026-06-18T10:25:37+00:00

I am retrieving the tenant name from the url. I’d prefer to do it

  • 0

I am retrieving the tenant name from the url. I’d prefer to do it only once, store it in the cookie, and retrieve it from there when I need it in a new page request.

I am using the code below to “create” a cookie. I was hoping that the interface would allow me to store additional information but it doesn’t. Is there a way to do this or am I on the wrong track?

    public void SignIn(string userName, bool createPersistentCookie)
    {
        if (String.IsNullOrEmpty(userName))
            throw new ArgumentException("Value cannot be null or empty.", "userName");

        FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
    } 

thanks in advance.

  • 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-18T10:25:39+00:00Added an answer on June 18, 2026 at 10:25 am

    Personally, I wouldn’t try to alter the Auth Cookie. Instead, create a new cookie:

    var myCookie = new HttpCookie("myCookie");//instantiate an new cookie and give it a name
    myCookie.Values.Add("TenantName", "myTenantName");//populate it with key, value pairs
    Response.Cookies.Add(myCookie);//add it to the client
    

    Then you can read the value on that’s written to the cookie like this

    var cookie = Request.Cookies["myCookie"];
    var tenantName = cookie.Values["TenantName"].ToString();
    //tenantName = "myTenantName"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While retrieving cookies I need to use: <c:forEach items=${cookie} var=currentCookie> ${currentCookie.value.name} </br> </c:forEach> But,
I'm retrieving a signed int from a SQL Server database and need to convert
I am retrieving 3 fields from a database, and by default, only the username
Retrieving items from a Tuple is done by accessing the ItemX property. Is there
When retrieving data from MySQL, the PHP array output has both numeric and name
Im retrieving a country name from a server in english. For example, Spain What
Am retrieving XML file from the url and i got the images through parsing
Hi i am currently retrieving multiple images from isolated storage. When i retrieve the
I am retrieving number of values from database, that need to be added to
When retrieving remote files from a serrver via HTTP, there is one situation where

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.