[ASP.NET]SessionId niet uniek.

Pagina: 1
Acties:

  • axis
  • Registratie: Juni 2000
  • Laatst online: 26-01-2023
Is it a bug or a feature?

Bij een site van me kreeg een klant die een formulier aan het invullen was opeens de gegevens van een ander voor zijn neus.. euh!?

Wij die logfiles doorspitten, blijkt dat ASP.NET doodleuk zijn SessionId's gewoon een aantal keer uitgeeft. Een paar dagen geleden heeft ie zelfs 69 users dezelfde sessionid gegeven. (echte aparte users, ander ip, andere browser, etc), een andere id is 41 keer uitgegeven, etc. verder heeft ie wel 5100 unieke sessionid's uitgegeven, dus hij kan het wel.. maar soms gaat het mis.

De sessionid zou toch uniek moeten zijn? Dit staat op MSDN:
Each active ASP.NET session is identified and tracked using a 120-bit SessionID string containing URL-legal ASCII characters. SessionID values are generated using an algorithm that guarantees uniqueness so that sessions do not collide, and SessionID’s randomness makes it harder to guess the session ID of an existing session.
Iemand enig idee waarom dit zou kunnen zijn?

De machine is een Windows Server 2003 standard edition op een dual xeon bak, met Framework v1.1, en uiteraard IIS 6.0. De sessionstate draait InProc.

Two advices for network troubleshooting.. learn to draw diagrams in Visio, and THINK IN LAYERS!


  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 20-08 11:40

gorgi_19

Kruimeltjes zijn weer op :9

Dit wordt een heel klein gokverhaaltje, dus niet afbranden.. :P Het zou me niets verbazen als je dual proc loopt te etteren en elkaar gaan tegenwerken.

Net even gezocht, zoekwoord is WebGarden
webGarden and cpuMask Equivalent Settings in IIS 6.0 Worker Process Isolation Mode
The webGarden attribute controls Web garden mode, or using multiple affinitized woker processes. The cpuMask controls the number of processes and the way the Web garden works.

Since webGarden enables the use of multiple processes, it means that all processes will have their own copy of things like application state, in-process session state, caches, and static data.

When using Web gardens, keep in mind the following:

If your application uses session state, it must choose an out-of-process provider (NT Service or SQL).
Application state and application statics are per process, not per computer.
Caching is per process, not per computer.
Web gardens can be also set up in IIS 6.0 worker process isolation mode by increasing the maximum number of worker processes per application pool from 1 to n (as required).

Digitaal onderwijsmateriaal, leermateriaal voor hbo


  • whoami
  • Registratie: December 2000
  • Laatst online: 22:54
Daar heeft het idd mee te maken.
Je zou er ook voor kunnen kiezen om ASP.NET geen gebruik te laten maken van je 2 CPU's door het cpuMask of het webGarden attribute te gaan aanpassen in je config-file, maar dat zou zonde zijn natuurlijk... :P

https://fgheysels.github.io/


  • axis
  • Registratie: Juni 2000
  • Laatst online: 26-01-2023
Hmm.. thnx voor de snelle reacties... Ga me er zo even over inlezen. Ik houd jullie op de hoogte ;)

Two advices for network troubleshooting.. learn to draw diagrams in Visio, and THINK IN LAYERS!