Hi,
My codes are working fine in local pc. When deploying in IIS Server. It can't detect the source file path.
Have tried using copy & move command in ASP.net 2.0 using VB.
From a list box, there are 3 files that need to be uploaded to the IIS server.
Is there a way to do it?
For i = 0 To lstFiles.Items.Count - 1
iEndPos = InStr(1, lstFiles.Items(i).Text.Trim(), " (File Size")
iLen = iEndPos - 1
strFN = Mid(lstFiles.Items(i).Text, 1, iLen)
sourcepath = strFN
destpath = strPath + strAttachPrefix + CStr(i) + FunctionReference.getfilename(lstFiles.Items(i).Text)
If File.Exists(sourcepath) = True Then
Dim fs As FileStream = File.Create(sourcepath)
fs.Close()
File.Copy(sourcepath, destpath)
End If
If File.Exists(sourcepath) = False Then
Dim fs As FileStream = File.Create(sourcepath)
fs.Close()
End If
File.Move(path, path2)
Next
Thanks in advance.
cheers
icy111
My codes are working fine in local pc. When deploying in IIS Server. It can't detect the source file path.
Have tried using copy & move command in ASP.net 2.0 using VB.
From a list box, there are 3 files that need to be uploaded to the IIS server.
Is there a way to do it?
For i = 0 To lstFiles.Items.Count - 1
iEndPos = InStr(1, lstFiles.Items(i).Text.Trim(), " (File Size")
iLen = iEndPos - 1
strFN = Mid(lstFiles.Items(i).Text, 1, iLen)
sourcepath = strFN
destpath = strPath + strAttachPrefix + CStr(i) + FunctionReference.getfilename(lstFiles.Items(i).Text)
If File.Exists(sourcepath) = True Then
Dim fs As FileStream = File.Create(sourcepath)
fs.Close()
File.Copy(sourcepath, destpath)
End If
If File.Exists(sourcepath) = False Then
Dim fs As FileStream = File.Create(sourcepath)
fs.Close()
End If
File.Move(path, path2)
Next
Thanks in advance.
cheers
icy111