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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:46:47+00:00 2026-05-24T06:46:47+00:00

If someone logs in on a pc from Starbucks (for example) and they accidentally

  • 0

If someone logs in on a pc from Starbucks (for example) and they accidentally check the ‘remember me’ option thereby setting a persistent cookie on that pc, is there any way of denying that cookie from the server without resorting to changing the cookie name in web.config?

  • 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-24T06:46:48+00:00Added an answer on May 24, 2026 at 6:46 am

    I solved this (a while back actually) by setting a machineKey in web.config & changing it when the username/password is changed:

     Sub ChangeMachineKey()
        Dim commandLineArgs As String() = System.Environment.GetCommandLineArgs()
        Dim decryptionKey As String = CreateMachineKey(64)
        Dim validationKey As String = CreateMachineKey(128)
        'HttpContext.Current.Response.Write(decryptionKey + "<br />" + validationKey + "<hr />")
        Dim filename As String = HttpContext.Current.Server.MapPath("~/Web.config")
        Dim XmlReader As XmlTextReader = New XmlTextReader(filename)
    
        Dim xDoc As XmlDocument = New XmlDocument()
        xDoc.Load(XmlReader)
        XmlReader.Close()
    
        Dim Node As System.Xml.XmlNode = xDoc.SelectSingleNode("//configuration/system.web/machineKey")
        Node.Attributes.GetNamedItem("validationKey").Value = validationKey
        Node.Attributes.GetNamedItem("decryptionKey").Value = decryptionKey
        xDoc.Save(filename)
    End Sub
    
    Public Shared Function CreateMachineKey(ByVal numBytes As Integer) As String
        Dim Random As Byte() = New Byte(numBytes / 2 - 1) {}
        Dim rng As New RNGCryptoServiceProvider()
        rng.GetBytes(Random)
        Dim machineKey As New System.Text.StringBuilder(numBytes)
        Dim i As Integer = 0
        Do While i < Random.Length
            machineKey.Append(String.Format("{0:X2}", Random(i)))
            i += 1
        Loop
        Return machineKey.ToString()
    End Function
    

    This forces everyone to sign in again but since there is only one admin account it works perfectly for me!

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

Sidebar

Related Questions

I just added SSL on secure.mydomain.com. When someone logs in, they POST from a
Someone told me about swamp diagrams explaning that they were useful to predict code
I have some framework / AOP code that logs exceptions from methods called deeper
When someone logs in on my website, it will output information just for that
Someone told me that it's faster to concatenate strings with StringBuilder. I have changed
Someone posted a great little function here the other day that separated the full
We have a website (foo.com) that does online training. A user logs in, then
I developed my own log processing program. To process logs originated from printk() ,
I have an HttpModule that I have put together from cobbling a couple of
So I have this query written by someone else that I'm trying to refactor,

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.