my nightmare - global.asa

Results 1 to 2 of 2

Thread: my nightmare - global.asa

  1. #1
    Join Date
    Dec 1969

    Default my nightmare - global.asa

    this is part of my global.asa<BR><BR>Sub Session_OnStart<BR> Session("X") =0 <BR> startPage = "default.asp"<BR> currentPage = Request.ServerVariables("SCRIPT_NAME")<BR> if strcomp(currentPage,startPage,1) then<BR> Response.Redirect(startPage)<BR> end if<BR>End Sub<BR>&#039************************************* Session_OnEnd *****************<BR>Sub Session_OnEnd<BR> Session("X")=0<BR> restartPage="http://haluz/default.asp?progress_done=reset"<BR> Response.Redirect(restartPage) &#039 ERROR LINE<BR>End Sub<BR><BR>problem starts,when session_onEnd function is called by server in ERRORLINE,server gets message - Response object needed<BR><BR>I don&#039t understant this, because session on_start works ok.<BR><BR>And ,when I try print variable session("X") on my 1th page default.asp<BR>like this &#060;%=session("X")%&#062;,at this time the variable is empty, so it look as its initialization in global.asa works improperly.<BR>How it is possible ? ... Can I initialize response.cookies("x")("y")=4<BR>in the global asa?

  2. #2
    Join Date
    Dec 1969

    Default RE: my nightmare - global.asa

    you can&#039t redirect on_end - there is an explanation - but in essence, there is no response object there for you to redirect with, so don&#039t try it.<BR><BR>j<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts