alex 0

alex 0

  • NA
  • 1
  • 0

Need urgent help to create directory and upload file

Apr 14 2005 1:11 AM
I have a trouble with creating the directory and uploading file on windows 2003 Server. The same code works on serveral computers, but doesn't work on one server. If any body can help me fix the problem, I would like to pay $50, detail check http://www.e2xpert.com/project.asp?projectid=10164 Source Code: If Directory.Exists(destPath) Then Directory.Delete(destPath, True) End If MkDir(destPath) UploadFile.PostedFile.SaveAs(destPath & "\" & filename) The error message is The error message is "Could not find a part of the path "E:\". at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path) at System.IO.Directory.CreateDirectory(String path) at Microsoft.VisualBasic.FileSystem.MkDir(String Path) If comment out MkDir(destPath) and create directory manually. the error message is Could not find a part of the path "E:\UpdateService\Server\WebSite\UpdateService\Updates\V3.0.6.0\msi.msi". at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at Publisher.PublishNew.imbPublish_Click(Object sender, ImageClickEventArgs e)