All the sessions reset when run copy folder or file
am 09.03.2007 23:06:31 von 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
[/CODE]
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?
Re: All the sessions reset when run copy folder or file
am 12.03.2007 02:07:38 von 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
job.noam@gmail.com wrote:
> 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
> [/CODE]
>
> 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