My project requires to create a text file on a certain drive. Initially when testing, the file is being written on C:\DOWNLOAD which is the local folder in my IIS server. Everything is OK.
For production, I proceeded to create a MAPPED NETWORK folder \\[Computer]\DOWNLOAD to dump the file and this is mapped in my IIS server as U:. When testing the project, the file is not being written to mapped drive U:\DOWNLOAD and upon debugging, it shows that the directory does not exists.
Why can't I write to a mapped drive? TIA
VB Code:
'+------------------------------------------------------------+ '| CHECK IF THE MAIN DIRECTORY EXISTS, IF NOT, USE THE BACKUP | '+------------------------------------------------------------+ Dim dirINFO As DirectoryInfo = New DirectoryInfo(dirUP) Dim txtFileName As String = GetTheFileName() If dirINFO.Exists = True Then dirDUMP = dirUP & txtFileName Else dirDUMP = dirDOWN & txtFileName End If
*** DEBUG ***
?dirup
"U:\DOWNLOAD\"
?dirdown
"c:\DOWNLOAD\"
?dirinfo.Exists
False <--- mapped drive does not exists




Reply With Quote