All session are getting down when I delete sessions folders

  • Thread starter George Ter-Saakov
  • Start date
G

George Ter-Saakov

It's a know fact.

ASP.NET monitors the Web project folder and recompiles the application as soon as it detects major changes.

If you modify one aspx files it will not recompile it. If you modify 15 aspx files it will shutdown application and recompile it. Thus killing all active sessions.

The same happens if you create or delete folder.

The solution - move that folder out of Web application folder.


George.



"Cesar Ronchese" <info||carsoftnet.com.br> wrote in message Hello,

I'm experiencing a very weird problem. I have a ASP.Net 2005 application (VB.Net) that creates some folders to store temporary files.

example:
Session_Start(...)
IO.Directory.CreateDirectory(Server.MapPath(".") & "\SessionFolders\" & Session.SessionID)
(...)

The same application holds a session object that logs on to my server application (desktop - non ASP), that shows all connected clients in a listview. See sample code:
Session_Start(...)
(...)
objClient.DoLogin("username","pwd", "etc") ' logs on to my application which show
'the client connected
Session("Client") = objClient

The problem occurs when I try delete that session folders when the session is ending:
Sub Session_End(...)
(...)
objClient = Session("Client")
objClient.DoLogout
IO.Directory.Delete(Server.MapPath(".") & "\SessionFolders\" & Session.SessionID)
End Sub


So, I look on to my server application (desktop), and noticed the connected client list is empty. All the sessions were abandoned!! For confirm this, I debugged the Session_End function and noticed when the folder deletion line is executed, the Session_End function is executed again, and recursively untill all the sessions are down.


Are me doing something wrong? Or it is a ASP.Net bug?

PS: For information, I'm using forms authentication, and the login component using a custom membership provider.

Cesar
 
C

Cesar Ronchese

Hello,

I'm experiencing a very weird problem. I have a ASP.Net 2005 application (VB.Net) that creates some folders to store temporary files.

example:
Session_Start(...)
IO.Directory.CreateDirectory(Server.MapPath(".") & "\SessionFolders\" & Session.SessionID)
(...)

The same application holds a session object that logs on to my server application (desktop - non ASP), that shows all connected clients in a listview. See sample code:
Session_Start(...)
(...)
objClient.DoLogin("username","pwd", "etc") ' logs on to my application which show
'the client connected
Session("Client") = objClient

The problem occurs when I try delete that session folders when the session is ending:
Sub Session_End(...)
(...)
objClient = Session("Client")
objClient.DoLogout
IO.Directory.Delete(Server.MapPath(".") & "\SessionFolders\" & Session.SessionID)
End Sub


So, I look on to my server application (desktop), and noticed the connected client list is empty. All the sessions were abandoned!! For confirm this, I debugged the Session_End function and noticed when the folder deletion line is executed, the Session_End function is executed again, and recursively untill all the sessions are down.


Are me doing something wrong? Or it is a ASP.Net bug?

PS: For information, I'm using forms authentication, and the login component using a custom membership provider.

Cesar
 
C

Cesar Ronchese

Allright! Thanks!

[]s
Cesar

It's a know fact.

ASP.NET monitors the Web project folder and recompiles the application as soon as it detects major changes.

If you modify one aspx files it will not recompile it. If you modify 15 aspx files it will shutdown application and recompile it. Thus killing all active sessions.

The same happens if you create or delete folder.

The solution - move that folder out of Web application folder.


George.



"Cesar Ronchese" <info||carsoftnet.com.br> wrote in message Hello,

I'm experiencing a very weird problem. I have a ASP.Net 2005 application (VB.Net) that creates some folders to store temporary files.

example:
Session_Start(...)
IO.Directory.CreateDirectory(Server.MapPath(".") & "\SessionFolders\" & Session.SessionID)
(...)

The same application holds a session object that logs on to my server application (desktop - non ASP), that shows all connected clients in a listview. See sample code:
Session_Start(...)
(...)
objClient.DoLogin("username","pwd", "etc") ' logs on to my application which show
'the client connected
Session("Client") = objClient

The problem occurs when I try delete that session folders when the session is ending:
Sub Session_End(...)
(...)
objClient = Session("Client")
objClient.DoLogout
IO.Directory.Delete(Server.MapPath(".") & "\SessionFolders\" & Session.SessionID)
End Sub


So, I look on to my server application (desktop), and noticed the connected client list is empty. All the sessions were abandoned!! For confirm this, I debugged the Session_End function and noticed when the folder deletion line is executed, the Session_End function is executed again, and recursively untill all the sessions are down.


Are me doing something wrong? Or it is a ASP.Net bug?

PS: For information, I'm using forms authentication, and the login component using a custom membership provider.

Cesar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top