By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 2,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

All session are getting down when I delete sessions folders

P: n/a
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
Jan 9 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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 news:Op*************@tk2msftngp13.phx.gbl...
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
Jan 9 '06 #2

P: n/a
Allright! Thanks!

[]s
Cesar

"George Ter-Saakov" <gt****@cardone.com> wrote in message news:%2******************@TK2MSFTNGP09.phx.gbl...
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 news:Op*************@tk2msftngp13.phx.gbl...
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
Jan 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.