Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gordon Saxby 1461 posts 1883 karma points
    Jan 31, 2023 @ 14:59
    Gordon Saxby
    0

    run 2 sites from Visual Studio on locahost at the same time

    Sometimes I want / need to run two different Umbraco instances, from different Visual Studio solutions, at the same time.

    Although they do run, I find that when I switch from "A" to "B" site (Umbraco backend), site "A" logs out very quickly, but not necessarily immediately.

    I log back into "A" and then "B" logs out.

    They are both running on localhost but on different ports. I am running IIS Express "Start with debugging".

    Is there a way to make each site honour it's own timeout period?

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Jan 31, 2023 @ 15:29
    Kevin Jump
    0

    Hi,

    I manage this with browser profiles,

    I have a chrome/edge profile for my personal Gmail account and one for work. (i actually have others too but it doesn't matter).

    then i open one Umbraco back office in one profile and the other in another, then they don't share session or cookies so don't log each other out.

    you can add profiles shortcuts to your taskbar in windows so you can swich between them quickly.

    e.g enter image description here

  • Gordon Saxby 1461 posts 1883 karma points
    Jan 31, 2023 @ 15:40
    Gordon Saxby
    0

    Urgh, that's a bit of a PITA :-(

    I do have multiple profiles, I'll try that then if there is no other way of fixing it.

  • Nik 1614 posts 7260 karma points MVP 7x c-trib
    Jan 31, 2023 @ 22:38
    Nik
    0

    Hey Gordon,

    Just to aid with understanding why this is the case, the port component of the domain doesn't play a part in the cookies determining when they are sent or not.

    As Kevin said, the only way to do this is with browser isolation. One way is using different browsers, the other is using one in normal mode and the other in incognito.

    You can configure each site in Visual Studio to launch a different profile I believe (although I can't remember how). I'm pretty sure I've had 4 running at the same time before, 1 in edge, 1 in edge incognito, 1 in chrome, and 1 in chrome incognito.

    If I remember correctly, it was quite quick to set up. :-)

    Nik

Please Sign in or register to post replies

Write your reply to:

Draft