You should find yourself outside just in front of the dungeon after relogging.
So… end the spell in front of the dungeon, relog, enter the dungeon, cast the spell, I’d assume.