HighTechTalks DotNet Forums  

all sessions lost after deleting folders

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss all sessions lost after deleting folders in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Filip
 
Posts: n/a

Default all sessions lost after deleting folders - 04-13-2006 , 05:02 AM






I have a big problem,

I'm developing a filemanager in Asp.NET 2.0 C#, as a filemanager do , I
delete,add,rename folders and files. After weeks of searching te problem why
the session is lost everytime I do an action like delete.. Finally I found
it . It causes the
appDomain to restart. The result of this is that all sessions are lost! Big
issue cause all information is kept in there when a user of the FileManager
logs in. I read several articles like Tod's one and Scott about appDomain
restarting when changing the folder or bin,webconfig in ASP.NET 2.0! In
ASP.NET 1.1 it works and the sessions doesn't dissapear. That sounds like a
step backwards to me.

Now is there a good solution or workaround to help this major problem?
there is the Linkd-command solution, but I guess it won't work on external
server.

If anyone have the same problem or even gets a solution you can contact me
@ filip_hunninck (AT) hotmail (DOT) com

It would be very lucky if someone has solution for this

Tnx

Reply With Quote
  #2  
Old   
Brock Allen
 
Posts: n/a

Default Re: all sessions lost after deleting folders - 04-13-2006 , 08:52 AM






You can configure session to live outside of the worker process such that
it will survive AppDomain restarts. Check out the mode option for session
state.

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


Quote:
I have a big problem,

I'm developing a filemanager in Asp.NET 2.0 C#, as a filemanager do ,
I delete,add,rename folders and files. After weeks of searching te
problem why the session is lost everytime I do an action like delete..
Finally I found it . It causes the appDomain to restart. The result of
this is that all sessions are lost! Big issue cause all information is
kept in there when a user of the FileManager logs in. I read several
articles like Tod's one and Scott about appDomain restarting when
changing the folder or bin,webconfig in ASP.NET 2.0! In ASP.NET 1.1 it
works and the sessions doesn't dissapear. That sounds like a step
backwards to me.

Now is there a good solution or workaround to help this major problem?
there is the Linkd-command solution, but I guess it won't work on
external server.

If anyone have the same problem or even gets a solution you can
contact me @ filip_hunninck (AT) hotmail (DOT) com

It would be very lucky if someone has solution for this

Tnx




Reply With Quote
  #3  
Old   
Filip
 
Posts: n/a

Default Re: all sessions lost after deleting folders - 04-14-2006 , 03:32 AM



That is a good idea, I tried it but I get some errors like these:

Unable to use SQL Server because ASP.NET version 2.0 Session State is not
installed on the SQL server. Please install ASP.NET Session State SQL Server
version 2.0 or above.

this was for the sqlserver , but it's the same with StateServer. I'm using
it locally (for the moment). Suppose I can 'install' the version of sql
server version, local. What to do when I'm on a external hostserver?

"Brock Allen" wrote:

Quote:
You can configure session to live outside of the worker process such that
it will survive AppDomain restarts. Check out the mode option for session
state.

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


I have a big problem,

I'm developing a filemanager in Asp.NET 2.0 C#, as a filemanager do ,
I delete,add,rename folders and files. After weeks of searching te
problem why the session is lost everytime I do an action like delete..
Finally I found it . It causes the appDomain to restart. The result of
this is that all sessions are lost! Big issue cause all information is
kept in there when a user of the FileManager logs in. I read several
articles like Tod's one and Scott about appDomain restarting when
changing the folder or bin,webconfig in ASP.NET 2.0! In ASP.NET 1.1 it
works and the sessions doesn't dissapear. That sounds like a step
backwards to me.

Now is there a good solution or workaround to help this major problem?
there is the Linkd-command solution, but I guess it won't work on
external server.

If anyone have the same problem or even gets a solution you can
contact me @ filip_hunninck (AT) hotmail (DOT) com

It would be very lucky if someone has solution for this

Tnx





Reply With Quote
  #4  
Old   
Egil Hogholt
 
Posts: n/a

Default Re: all sessions lost after deleting folders - 04-14-2006 , 05:01 AM



Hi.
You have to create the database on the SQL Server for storing the session
data. You can create it using the ASPNET_REGSQL.EXE tool in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

The DB can be deployed using a script when you deploy to an external host
server.

Cheers,
Egil
http://www.egilh.com/

"Filip" <Filip (AT) discussions (DOT) microsoft.com> wrote

Quote:
That is a good idea, I tried it but I get some errors like these:

Unable to use SQL Server because ASP.NET version 2.0 Session State is not
installed on the SQL server. Please install ASP.NET Session State SQL
Server
version 2.0 or above.

this was for the sqlserver , but it's the same with StateServer. I'm using
it locally (for the moment). Suppose I can 'install' the version of sql
server version, local. What to do when I'm on a external hostserver?

"Brock Allen" wrote:

!-- cut --




Reply With Quote
  #5  
Old   
Benjamin Strackany
 
Posts: n/a

Default Re: all sessions lost after deleting folders - 06-06-2006 , 02:27 PM



Couldn't you just use mode=StateServer & skip the whole database aspect?

Ben Strackany
www.developmentnow.com


"Filip" <Filip (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,
I did all the things you said.
Tnx it works quit good.

I'v got another question, is it possible to do that on a Mysql Database??

TNX!!
Regards

"Egil Hogholt" wrote:

Hi Filip.
You have to use mode="SQLServer" to maintain session state in a SQL
Server.

What you "have to"/"can do" depends on your web hosting provider as some
may
provide a StateServer for you.

You can use a dedicated session state server with a syntax like this:
sessionState
mode="StateServer"
....
stateConnectionString="tcpip=serverort"
stateNetworkTimeout="number of seconds"
/sessionState
......


You have to use this syntax to use a SQL Server:
sessionState
mode="SQLServer"
sqlConnectionString="Data Source=SQLServerCustomDatabase;Initial
Catalog=NAME;Persist Security Info=True;User ID=U_ID;Password=PW"
sqlCommandTimeout="10"
...
/sessionState


Cheers,
Egil
http://www.egilh.com/

"Filip" <Filip (AT) discussions (DOT) microsoft.com> wrote in message
news:A3FFC1D4-2998-4D94-96BF-952ADDAC58D4 (AT) microsoft (DOT) com...
Dear Egil,

I took a look at aspnet_regsql.exe tool and all the parameters. If you
want.. I'm gonna have need of your help. I want to try it with a
SessionState
and run the script on the external database.

i tried: aspnet_regsql.exe -d [customdatabaseName] -ssadd -sstype c
-sqlexportonly c:\file.sql

So the script is exporting to the file c:\file.sql. And when i run
that
script on the sql server in customdatabaseName it is gonna work, right?
So you have to preserve a whole database only for the sessionState?
Cause
I
only use an amount 15 Sessions in my project.

In Web.config you have to set

sessionState mode="StateServer"
sqlConnectionString="Data
Source=SQLServerCustomDatabase;Initial Catalog=NAME;Persist Security
Info=True;User ID=U_ID;Password=PW"
cookieless="false"
timeout="15"/

Is this correct? I really want to have a breakthrough my problems with
losing sessions after deleting folders in appDomain. Hoping this gonna
work.

Tnx in advance!!!!
Kind Regards ,
Filip
!-- cut --






Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.