473,320 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

All the sessions reset when run copy folder or file

Hello,

I have very weird problem on my server, when I run this function:
Expand|Select|Wrap|Line Numbers
  1. Sub TransferFiles(departTemp_id,depart_id)
  2. 'Copy the files to the depart from the template
  3. '--
  4. Dim objFolder
  5. Dim objFSO
  6. Dim objFile
  7. Dim oFolder
  8. '--
  9. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
  10. 'Get the folder object associated with the directory
  11. Set objFolder = objFSO.GetFolder(server.mappath("/
  12. image/"&departTemp_id&""))
  13. 'Loop through the Files collection
  14. For Each objFile in objFolder.Files
  15. if Not objFSO.FileExists(server.mappath("/
  16. image/"&depart_id&"/"&objFile.Name&"")) then
  17. objFSO.CopyFile server.mappath("/
  18. image/"&departTemp_id&"/"&objFile.Name&""),server.mappath("/
  19. image/"&depart_id&"/"&objFile.Name&""),False
  20. End If
  21. Next
  22. 'Loop through the Folder collection
  23. For Each oFolder in objFolder.SubFolders
  24. if Not objFSO.FolderExists(server.mappath("/
  25. image/"&depart_id&"/"&oFolder.Name&"")) then
  26. objFSO.CopyFolder server.mappath("/
  27. image/"&departTemp_id&"/"&oFolder.Name&""),server.mappath("/
  28. image/"&depart_id&"/"&oFolder.Name&""),False
  29. End If
  30. Next
  31. 'Clean up!
  32. Set objFolder    = Nothing
  33. Set objFile        = Nothing
  34. Set objFSO        = Nothing
  35. End Sub
  36.  
All the sessions of all users that in my website as end.

This is very weird,
I'm using ASP on windows server 2003 str with IIS 6.

Can any one help me with that?

Mar 9 '07 #1
1 2484
It sounds like the application is getting reset. Does the code
complete i.e. could it be failing half way through, causing a bad
error and resetting the IIS app? Is there anything in the event log or
an IIS 500 error in the web log?

Robert Chafer
http://aspcompiler.com

jo******@gmail.com wrote:
Hello,

I have very weird problem on my server, when I run this function:
Expand|Select|Wrap|Line Numbers
  1.  Sub TransferFiles(departTemp_id,depart_id)
  2.  'Copy the files to the depart from the template
  3.  '--
  4.  Dim objFolder
  5.  Dim objFSO
  6.  Dim objFile
  7.  Dim oFolder
  8.  '--
  9.  Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
  10.  'Get the folder object associated with the directory
  11.  Set objFolder = objFSO.GetFolder(server.mappath("/
  12.  image/"&departTemp_id&""))
  13.  'Loop through the Files collection
  14.  For Each objFile in objFolder.Files
  15.      if Not objFSO.FileExists(server.mappath("/
  16.  image/"&depart_id&"/"&objFile.Name&"")) then
  17.          objFSO.CopyFile server.mappath("/
  18.  image/"&departTemp_id&"/"&objFile.Name&""),server.mappath("/
  19.  image/"&depart_id&"/"&objFile.Name&""),False
  20.      End If
  21.  Next
  22.  'Loop through the Folder collection
  23.  For Each oFolder in objFolder.SubFolders
  24.      if Not objFSO.FolderExists(server.mappath("/
  25.  image/"&depart_id&"/"&oFolder.Name&"")) then
  26.          objFSO.CopyFolder server.mappath("/
  27.  image/"&departTemp_id&"/"&oFolder.Name&""),server.mappath("/
  28.  image/"&depart_id&"/"&oFolder.Name&""),False
  29.      End If
  30.  Next
  31.  'Clean up!
  32.  Set objFolder    = Nothing
  33.  Set objFile        = Nothing
  34.  Set objFSO        = Nothing
  35.  End Sub
  36.  

All the sessions of all users that in my website as end.

This is very weird,
I'm using ASP on windows server 2003 str with IIS 6.

Can any one help me with that?
--

Rob Chafer
Silverfrost
Mar 12 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave Mateer | last post by:
Hi Why does the following code allow me to keep the same session when in the same sub domain (ie admin.localhost), yet not when I goto another related domain eg main.localhost? I would like...
10
by: Marcus | last post by:
Hi All, First, just wanted to say that I found what I thought was a very helpful tutorial on sessions in case anyone out there has questions on them: ...
2
by: Ik Ben Het | last post by:
Hello, I posted a simular question in the "IIS Security" group but it think it is more usefull to post it here. I want to do something very simpel. Make a part of my website available only...
8
by: Ron Vecchi | last post by:
I know this has been asked before but I out of all the posts I've read regarding using Directory.Move and then the application restarting itself I have found no answer except that Sessions are...
4
by: Ian Davies | last post by:
Hello I am struggling for a solution to clear some fields on my webpage that takes their values from some sessions My solution below works when the button is clicked twice. I sort of know why I...
3
by: AlonR | last post by:
Hi, We're experiencing random user sessions losses on our web applications, and are researching for any useful information which may shed light on this problem. Environment: In our...
2
by: comp.lang.php | last post by:
I am in the middle of debugging a script that is hanging on "session_start()", which, if I recall, can occur if session.save_path points to a directory onto which you do not have permission to...
3
by: Jon Slaughter | last post by:
Any pitfalls or stuff I need to worry about when working with sessions? I want to write a log file and hit counter along with a login interface and I'm trying to learn this stuff. ...
1
by: Tom | last post by:
My unsigned DLL works in my project that references it as long as I set Copy Local = true. Now I have signed the DLL with the sn.exe generated keys but have not yet moved the DLL into the GAC. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.