Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Session object
Message
 
To
13/08/2003 12:00:20
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00819538
Message ID:
00819849
Views:
14
Hey, that's a snap—thanks!


>Jeff,
>
>>(I'm intrigued by your recent project to configure MS-SQL as a session storage vehicle—I'd like to do that someday.)<
>
>That is basically a no-brainer. I found a few links somewhere that explained how to do it. Not remembering where they were, here's the steps to do this in a nutshell:
>
>1) SqlAgent must be enabled and running.
>
>2) The .NET framework comes with a SQL script that must be run. It's called InstallPersistSqlState.sql and can be found in the Framework directory. The script will install a Database called ASPState with two tables: ASPStateTempApplications and ASPStateTempSessions. It also creates a SQL job for SQLAgent to run.
>
>3) Add the following to your web.config, under the < system.web > tag:
>
> <sessionState mode="SQLServer"
>      sqlConnectionString="server=MyServerName;uid=MyUserID;pwd=MyPassword" />
>
>
>That's it .... it can't get any easier than that, can it? =)
>
>~~Bonnie
>
>
>
>>The server needs to know which browser made the request, and the only way it can do that is by getting some unique identifier from the browser. That identifier can be:
>>
>>1. A cookie (GET or POST)
>>2. A CGI QueryString (GET)
>>3. A hidden form variable (POST)
>>
>>Once the session is established between IIS and the browser, there's more than one way to store the session info on the server-side, MS-SQL being one of them. (I'm intrigued by your recent project to configure MS-SQL as a session storage vehicle—I'd like to do that someday.)
>>
>>How a given session is stored/managed on the server is a different issue from the means of determining which requesting browser belongs to which session.
>>
>>
>>
>>
>>>Actually, now that I think about it a little more, I don't know why it would necessarily *have* to use a cookie when you are using SQL Server. The web server knows about the fact that you are using SQL Server, as you need to include the SessionState mode in your web.config.
>>>
>>>Are you sure about this?
>>>
>>>~~Bonnie

Read about the greatest fraud in the history of mankind.
See TaxableIncome.net.
Previous
Reply
Map
View

Click here to load this message in the networking platform