Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > WEB.Config issue!!!

Reply
Thread Tools

WEB.Config issue!!!

 
 
=?Utf-8?B?TWFoZXNo?=
Guest
Posts: n/a
 
      03-15-2005
Hi All,

I noticed in my wb app whenever I modify my web.config the existing sessions
are getting dropped.

I cant understand why this is happening....
 
Reply With Quote
 
 
 
 
recoil@community.nospam
Guest
Posts: n/a
 
      03-15-2005
The Web Application is restarted whenever a change is made to
web.config i believe.

I believe this means that any information that is stored in Sessions,
Application or Cache is discarded.

If you note events for Session/Application End and Start are probably
are triggered.

Also important to note that any information in the Session or
Application should be deemd unimportant as it can be lost at a moment's
notice. This means that you should have alternate methods of storage
and identifying which information belongs to a session or an
application (depending upon how important the information is)

 
Reply With Quote
 
 
 
 
Peter Rilling
Guest
Posts: n/a
 
      03-15-2005
ASP.NET gets reloaded when the config file changes. That might cause it to
release all memory.

"Mahesh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
>
> I noticed in my wb app whenever I modify my web.config the existing

sessions
> are getting dropped.
>
> I cant understand why this is happening....



 
Reply With Quote
 
Brock Allen
Guest
Posts: n/a
 
      03-15-2005
Your session state by default is being maintained InProc (in memory in the
web application). Once your settings in web.config changes, your running
web applicaiton is no longer consistent with the config settings, so ASP.NET
shuts it down and brings up a new on to replace it (with the current settings).
So, when it shuts down your in memory state (like session state) is lost.

Consider 1) not using session state at all. There are many ways to build
an app, maintain state and not store it in session state. Or 2) Configure
session state to use the StateServer NT Service, which is an out of process
app that holds session state such that the state will survive a application
restart. You can also store this data in SqlServer, but for your needs, I
imagine the StateServer Service is sufficient.

-Brock
DevelopMentor
http://staff.develop.com/ballen



> Hi All,
>
> I noticed in my wb app whenever I modify my web.config the existing
> sessions are getting dropped.
>
> I cant understand why this is happening....
>




 
Reply With Quote
 
Brock Allen
Guest
Posts: n/a
 
      03-15-2005
> Or 2)
> Configure session state to use the StateServer NT Service, which is an
> out of process app that holds session state such that the state will
> survive a application restart. You can also store this data in
> SqlServer, but for your needs, I imagine the StateServer Service is
> sufficient.


And, BTW, this is done in web.config under the <sessionState> element:

http://msdn.microsoft.com/library/de...atesection.asp

-Brock
DevelopMentor
http://staff.develop.com/ballen



 
Reply With Quote
 
jongalloway
Guest
Posts: n/a
 
      03-15-2005
Editing your web.config file causes an application restart so ASP.NET
can load the site with your new web.config settings. If you're using
InProc session state, that means your sessions get dropped.

You can move your session state to either the State Server or SQL
Server, which will maintain session information through an application
restart. More information on that here:
http://msdn.microsoft.com/library/de...ssionstate.asp

Your webserver respond slowly on the first page hit after you've edited
the web.config file, since ASP.NET needs to JIT compile your code. It's
a good idea to browse to the site yourself immediately after editing
web.config to trigger this.

- Jon
http://weblogs.asp.net/jgalloway

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments