Re: Session_End and SqlServer Session Mode

From: Karahan Celikel (NOkarahan_celikelSPAM_at_hotmail.com)
Date: 02/16/04


Date: Mon, 16 Feb 2004 10:23:07 -0600

Thanks Alvin and Yan-Hong for your replies.

but isn't it weird that session_start is fired but not session_end?

"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message
news:QtNsZaG9DHA.2100@cpmsftngxa07.phx.gbl...
> Hello Karahan,
>
> Thanks for posting in the group.
>
> I agree with Alvin that Session_End event is supported only in InProc
mode.
>
> Here is a quick summary of the major things you need to know about picking
> asp.net session state mode:
>
> Storage location
> ----------------
> InProc - session kept as live objects in web server (aspnet_wp.exe)
>
> StateServer - session serialized and stored in memory in a separate
process
> (aspnet_state.exe). State Server can run on another machine
>
> SQLServer - session serialized and stored in SQL server
>
> Performance
> ------------
> InProc - Fastest, but the more session data, the more memory is consumed
on
> the web server, and that can affect performance.
>
> StateServer - When storing data of basic types (e.g. string, integer,
etc),
> in one test environment it's 15% slower than InProc. However, the cost of
> serialization/deserialization can affect performance if you're storing
lots
> of objects. Have to do performance testing for your own scenario.
>
> SQLServer - When storing data of basic types (e.g. string, integer, etc),
> in one test environment it's 25% slower than InProc. Same warning about
> serialization as in StateServer.
>
>
> Robustness
> -----------
> InProc - Session state will be lost if the worker process (aspnet_wp.exe)
> recycles, or if the appdomain restarts. It's because session state is
> stored in the memory space of an appdomain. Read doc on when such events
> will happen.
>
> StateServer - Solve the session state loss problem in InProc mode. Allows
> a webfarm to store session on a central server. Single point of failure
at
> the State Server.
>
> SQLServer - Similar to StateServer. Moreover, session state data can
> survive a SQL server restart after you've followed instructions in KB
> 311029.
>
> Caveats
> --------
> InProc - It won't work in web garden mode, because in that mode multiple
> aspnet_wp.exe will be running on the same machine. Switch to StateServer
> or SQLServer when using web garden. Also Session_End event is supported
> only in InProc mode.
>
> StateServer - In a web farm, make sure you have the same <machineKey> in
> all your web servers. See KB 313091 on how to do it. Also, make sure
your
> objects are serializable. See KB 312112 for details.
>
> SQLServer - If you specify integrated security in the connection string
> (e.g. "trusted_connection=true", or "integrated security=sspi"), it won't
> work if you also turn on impersonation in asp.net. Unfortunately, this
bug
> isn't reported in KB yet. (There is a QFE fix for it.) Also, make sure
> your objects are serializable. See KB 312112 for details.
>
> Does that answer your question?
>
> Best regards,
> Yanhong Huang
> Microsoft Community Support
>
> Get Secure! ¨C www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>



Relevant Pages

  • RE: Session_End and SqlServer Session Mode
    ... I agree with Alvin that Session_End event is supported only in InProc mode. ... InProc - session kept as live objects in web server ... InProc - Session state will be lost if the worker process ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Session_End and SqlServer Session Mode
    ... of the session end event and when it fires. ... >> I agree with Alvin that Session_End event is supported only in InProc ... State Server can run on another machine ... >> InProc - Session state will be lost if the worker process ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: State Server not working
    ... any other help besides posts that all say the same things and I have tryed ... I am getting the error "Unable to make the session state request to ... the session state server. ... If setting a breakpoint and stepping through app to try to catch this ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Internet Printers Problems
    ... Because installing SUS locks down your IIS server by installing URLScan. ... The WebDAV, Internet Printing, and Indexing service features of IIS are ... the session state is disabled by SUS. ... Server requirements and recommendations for installing Microsoft Software ...
    (microsoft.public.windows.server.sbs)
  • Re: Unable to serialize the session state
    ... to an ASP Session State database (SQL Server 2000). ... Unable to serialize the session state. ... An unhandled exception occurred during the execution of the ...
    (microsoft.public.dotnet.framework.aspnet)

Loading