|
-
Jul 28th, 2005, 09:26 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Writing File To A Network Mapped Drive
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
Last edited by ARPRINCE; Jul 28th, 2005 at 01:52 PM.
-
Jul 28th, 2005, 01:59 PM
#2
Thread Starter
Hyperactive Member
Re: [RESOLVED] Writing File To A Network Mapped Drive
I got this LINK from UNCLEB.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|