472,122 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,122 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 2411
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Marcus | last post: by
2 posts views Thread by Ik Ben Het | last post: by
8 posts views Thread by Ron Vecchi | last post: by
4 posts views Thread by Ian Davies | last post: by
3 posts views Thread by AlonR | last post: by
2 posts views Thread by comp.lang.php | last post: by
3 posts views Thread by Jon Slaughter | last post: by
reply views Thread by leo001 | last post: by

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.