![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 -- |
#5
| |||
| |||
|
|
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=server ort"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 -- |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |