Ask a Question related to ASP.NET General, Design and Development.
-
Sampriti #1
Session end event fires but it is not executing code
I am trying to delete a file from a disk when the user's
session ends. So I am putting my file.delete code in
Session_End event. I ran the application in the debug
mode. When the session timesout session event is firing
but it is not executing any of my delete code. Can
somebody tell me what I am doing wrong?
Thanks in advance
Sampriti Guest
-
Event Fires after CreateChildControls
I have created a C# control that creates its objects within CreateChildControls. One of those objects is a button which I have attached to a... -
Custom control fires event but ignores some code in the code behind file
I do not quite understand the question. I will merely point out that most programming problems happen for a reason. Code works the way it is... -
ItemCommand Event fires twice
Hi! I have a DataList with some linkbuttons, and when i click them the eventhandler fires twice. Is there a way around this?, it's the same... -
asp:textbox_TextChanged event no longer fires???
Hi, I have a textbox control with some typical textchanged event code. It has worked fine, but all of a suddent the event no longer fires when you... -
Page Load Event Fires Twice
This is a classic asp newsgroup. While you may be lucky enough to find a dotnet-savvy person here who can answer your question, you can eliminate... -
Marina #2
Re: Session end event fires but it is not executing code
If you are using session mode other then InProce, session_end will not fire.
If you are usnig inproc - then how do u know it's firing if your code is not
being executed?
Also, posting the code would be helpful.
"Sampriti" <sudha_s@mailcity.com> wrote in message
news:0f5001c33c06$b1d85140$a601280a@phx.gbl...> I am trying to delete a file from a disk when the user's
> session ends. So I am putting my file.delete code in
> Session_End event. I ran the application in the debug
> mode. When the session timesout session event is firing
> but it is not executing any of my delete code. Can
> somebody tell me what I am doing wrong?
>
> Thanks in advance
Marina Guest
-
George Durzi #3
Re: Session end event fires but it is not executing code
how do you know the Session_End event is firing? If your delete code is
correct, and works, and the session_end event is firing, and your delete
code is called in session_end, then there isn't a reason for it not to work
unless, you don't have permission to delete the file? Did you step into it
and verify that the delete code is running?
"Sampriti" <sudha_s@mailcity.com> wrote in message
news:0f5001c33c06$b1d85140$a601280a@phx.gbl...> I am trying to delete a file from a disk when the user's
> session ends. So I am putting my file.delete code in
> Session_End event. I ran the application in the debug
> mode. When the session timesout session event is firing
> but it is not executing any of my delete code. Can
> somebody tell me what I am doing wrong?
>
> Thanks in advance
George Durzi Guest
-
Marina #4
Re: Session end event fires but it is not executing code
What Console are you trying to write to?
Instead, try logging the beginning of Session_End to a database or
something. Make sure it is executing.
"sampriti" <sudha_s@mailcity.com> wrote in message
news:05ba01c33c22$aef3be30$a101280a@phx.gbl...> This is how I know my session end event is firing
> 1.I have put break point on first line of code in
> session_end event.
> 2.when the event fires the breakpoint which is red
> initially turns yellow.
> 3.When I click stepInto nothing happens and breakpoint
> turns red.
> Here is my file delete code in session_end event of my
> global.asax file
> string strSessionDatasetFile = Server.MapPath
> ("~/SearchXML/"+Session.SessionID+".xml");
> FileInfo fi = new FileInfo(strSessionDatasetFile);
> if(fi.Exists)
> {
> // delete the file
> try
> {
> fi.Delete();
> }
> catch (Exception ex)
> {
> Console.WriteLine(ex.ToString());
> }
>
> }
>> session_end will not fire.> >-----Original Message-----
> >If you are using session mode other then InProce,> if your code is not> >
> >If you are usnig inproc - then how do u know it's firing> >being executed?
> >
> >Also, posting the code would be helpful.
> >
> >"Sampriti" <sudha_s@mailcity.com> wrote in message
> >news:0f5001c33c06$b1d85140$a601280a@phx.gbl...> >> >> I am trying to delete a file from a disk when the user's
> >> session ends. So I am putting my file.delete code in
> >> Session_End event. I ran the application in the debug
> >> mode. When the session timesout session event is firing
> >> but it is not executing any of my delete code. Can
> >> somebody tell me what I am doing wrong?
> >>
> >> Thanks in advance
> >
> >.
> >
Marina Guest
-
Rad #5
Re: Session end event fires but it is not executing code
(insufficient) permissions on the file..
"Sampriti" <sudha_s@mailcity.com> wrote in message
news:0f5001c33c06$b1d85140$a601280a@phx.gbl...> I am trying to delete a file from a disk when the user's
> session ends. So I am putting my file.delete code in
> Session_End event. I ran the application in the debug
> mode. When the session timesout session event is firing
> but it is not executing any of my delete code. Can
> somebody tell me what I am doing wrong?
>
> Thanks in advance
Rad Guest



Reply With Quote

