M
Mark Brown
I'm trying to create a web page that allows the user to upload a file. If I set the save path somewhere on drive C:\, it works just fine. However, I need it to save elsewhere, like drive E:\. When I do this, I get an error saying "Could not find a part of the path '...' and then is lists the path. All the pieces of the path are there and if you change E: to C:, it works.
Is there some concept I'm missing or is it just not possible for a web page to save someplace other than C:\?
Here's the code that does the saving:
Dim fn As String = System.IO.Path.GetFileName(File2.PostedFile.FileName)
Dim SaveLocation As String = "e:\webtst\images\" & Session("CADNum") & "\" & fn
Try
Directory.CreateDirectory("e:\webtst\images\" & Session("CADNum"))
File2.PostedFile.SaveAs(SaveLocation)
SaveLocInfo(SaveLocation)
Catch ex As Exception
Dim Tmp As String = ex.Message
End Try
The session variable does contain a value.
Thanks,
Mark
Is there some concept I'm missing or is it just not possible for a web page to save someplace other than C:\?
Here's the code that does the saving:
Dim fn As String = System.IO.Path.GetFileName(File2.PostedFile.FileName)
Dim SaveLocation As String = "e:\webtst\images\" & Session("CADNum") & "\" & fn
Try
Directory.CreateDirectory("e:\webtst\images\" & Session("CADNum"))
File2.PostedFile.SaveAs(SaveLocation)
SaveLocInfo(SaveLocation)
Catch ex As Exception
Dim Tmp As String = ex.Message
End Try
The session variable does contain a value.
Thanks,
Mark