Prev: hotting
Next: Setting Excel Column Width in ASP
From: Mark Meyers on 20 Jul 2010 13:12 I have no clue what is happening and hope someone can explain this. I have my Web site set up to use SQL Server session state. This works fine. When a session starts, a row is created in ASPStateTempSessions. When the user logs off the application, I am trying to call the stored procedure TempRemoveStateItem to clean up after myself (not sure if this is the right way to do it or not). What I noticed is that the SQL table's SessionID column contains 32 characters whereas the .NET Session.SessionID value only contains 24 characters (which match the first 24 characters of the 32 characters stored in the SQL table). Because the values do not match, the stored procedure always fails. Why would the SessionID value differ between .NET and SQL?
From: Dan on 21 Jul 2010 06:24 "Mark Meyers" <MarkMeyers(a)discussions.microsoft.com> wrote in message news:AD02020B-916B-4B57-8EAA-047459269BB3(a)microsoft.com... > I have no clue what is happening and hope someone can explain this. > > I have my Web site set up to use SQL Server session state. This works > fine. > When a session starts, a row is created in ASPStateTempSessions. > > When the user logs off the application, I am trying to call the stored > procedure TempRemoveStateItem to clean up after myself (not sure if this > is > the right way to do it or not). > > What I noticed is that the SQL table's SessionID column contains 32 > characters whereas the .NET Session.SessionID value only contains 24 > characters (which match the first 24 characters of the 32 characters > stored > in the SQL table). Because the values do not match, the stored procedure > always fails. > > Why would the SessionID value differ between .NET and SQL? This newsgroup is about classic ASP, not ASP.NET. You might have more chance of an answer in the relevant dotnet group. Personally, I've never looked into it. Without any example values to look at it's hard to make an educated guess (I don't have an ASP.NET site to tinker with either), but I would take a stab that the extra characters are an identifier used to differentiate between servers in a farm, or multiple sites in a single server, to prevent SessionID collisions across different sites/servers. Do the extra characters bear any relation to the IIS site identifier? -- Dan
|
Pages: 1 Prev: hotting Next: Setting Excel Column Width in ASP |