All the sessions reset when run copy folder or file

J

job.noam

Hello,

I have very weird problem on my server, when I run this function:
Code:
Sub TransferFiles(departTemp_id,depart_id)
'Copy the files to the depart from the template
'--
Dim objFolder
Dim objFSO
Dim objFile
Dim oFolder
'--
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'Get the folder object associated with the directory
Set objFolder = objFSO.GetFolder(server.mappath("/
image/"&departTemp_id&""))
'Loop through the Files collection
For Each objFile in objFolder.Files
if Not objFSO.FileExists(server.mappath("/
image/"&depart_id&"/"&objFile.Name&"")) then
objFSO.CopyFile server.mappath("/
image/"&departTemp_id&"/"&objFile.Name&""),server.mappath("/
image/"&depart_id&"/"&objFile.Name&""),False
End If
Next
'Loop through the Folder collection
For Each oFolder in objFolder.SubFolders
if Not objFSO.FolderExists(server.mappath("/
image/"&depart_id&"/"&oFolder.Name&"")) then
objFSO.CopyFolder server.mappath("/
image/"&departTemp_id&"/"&oFolder.Name&""),server.mappath("/
image/"&depart_id&"/"&oFolder.Name&""),False
End If
Next
'Clean up!
Set objFolder	= Nothing
Set objFile		= Nothing
Set objFSO		= Nothing
End Sub

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?
 
R

Robert Chafer

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

Hello,

I have very weird problem on my server, when I run this function:
Code:
Sub TransferFiles(departTemp_id,depart_id)
'Copy the files to the depart from the template
'--
Dim objFolder
Dim objFSO
Dim objFile
Dim oFolder
'--
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'Get the folder object associated with the directory
Set objFolder = objFSO.GetFolder(server.mappath("/
image/"&departTemp_id&""))
'Loop through the Files collection
For Each objFile in objFolder.Files
	if Not objFSO.FileExists(server.mappath("/
image/"&depart_id&"/"&objFile.Name&"")) then
		objFSO.CopyFile server.mappath("/
image/"&departTemp_id&"/"&objFile.Name&""),server.mappath("/
image/"&depart_id&"/"&objFile.Name&""),False
	End If
Next
'Loop through the Folder collection
For Each oFolder in objFolder.SubFolders
	if Not objFSO.FolderExists(server.mappath("/
image/"&depart_id&"/"&oFolder.Name&"")) then
		objFSO.CopyFolder server.mappath("/
image/"&departTemp_id&"/"&oFolder.Name&""),server.mappath("/
image/"&depart_id&"/"&oFolder.Name&""),False
	End If
Next
'Clean up!
Set objFolder	= Nothing
Set objFile		= Nothing
Set objFSO		= Nothing
End Sub

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top