Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 19th, 2003, 12:38 PM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Session_OnEnd problem -- pls help!!!!!

Maybe I am just stupid and there is a better way to accomplish this, but here is what I am trying to do.

I create a textfile on the server that I use to capture customer info, etc. everytime a user "logs in" to my site. I save this filename as a session var for easy access all over the web. When the user "logs out" I request the filename from the session and delete it. I tried adding the same code to my session_onEnd in the global.asa, but I guess that the server is already terminating the session before executing the sub routine because it does not delete the file. If this is the case, is there a way I can request the session vars before it terminates?

Could anyone please point me in the right direction? I'm running out of fingernails to bite.

Thank you so much!!!

Andrew
 
Old September 22nd, 2003, 02:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you using IISv4 or v5? If you are using v5, and you running the web site in low, medium or high isolation? If it's medium or high isolation, then the dllhost.exe process is running under the IWAM_Username account, and you need to give that account sufficient NTFS privileges to delete the files on the server...

If you are unsure, you can use the FileMon utility from www.sysinternals.com to see if there are any access denied errors occuring, and on what files they are occuring on.

Cheers
Ken

www.adOpenStatic.com
 
Old September 22nd, 2003, 06:16 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also make sure you are not using Server.MapPath to locate the file. This is one of a few commands you can not use in Session_OnEnd. You also can not use the Response object. If you try to use any of these then an error is raised, and usually the subroutine simply ends unless you have an error trap in there.

Regards
Owain Williams





Similar Threads
Thread Thread Starter Forum Replies Last Post
DateTime Problem!!! Pls help cmualo SQL Server 2000 4 August 17th, 2007 03:08 AM
Problem deleting folder in Session_OnEnd Sowee Classic ASP Basics 3 March 9th, 2007 07:18 AM
I myself solved my problem(now u all pls help me i rashmipant BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 October 12th, 2006 04:34 AM
Pls help me (mergesort problem) hlchuah77 Visual C++ 0 August 13th, 2004 11:38 AM
update problem again... pls help... life_s Ng ASP.NET 1.0 and 1.1 Basics 1 September 4th, 2003 02:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.