M
mcarrera00
Hi,
I have a problem with uploading files to a webserver.
Here it's the code
Dim strPath As String = MapPath(fileName).ToLower
strPath = strPath.Replace("\usercntrls", "\uploads")
fileUpload.PostedFile.SaveAs(strPath)
usercntrls is where the control resides on the server, upload is the
destination where the file is supposed to be saved. When the problem
occurs, the file gets saved in usercntrls, rather than in uploads.
What drives me nut is that sometimes the file is saved in the proper
location, sometimes not. It should not be a problem of permissions,
and if the file exists, it should be overwritten. Sometimes it get
fixed recompiling the application and uploading the dlls...
Any idea?
Thanks a lot!
Marco.
I have a problem with uploading files to a webserver.
Here it's the code
Dim strPath As String = MapPath(fileName).ToLower
strPath = strPath.Replace("\usercntrls", "\uploads")
fileUpload.PostedFile.SaveAs(strPath)
usercntrls is where the control resides on the server, upload is the
destination where the file is supposed to be saved. When the problem
occurs, the file gets saved in usercntrls, rather than in uploads.
What drives me nut is that sometimes the file is saved in the proper
location, sometimes not. It should not be a problem of permissions,
and if the file exists, it should be overwritten. Sometimes it get
fixed recompiling the application and uploading the dlls...
Any idea?
Thanks a lot!
Marco.