Sudhanshum
asked on
File upload using Virtual Directory on different server getting failed
I have created Virtual Directory named as Downloadserver on my website IIS (192.168.1.1\Download), That 192.168.1.1 is another server, while website is setup on 192.168.1.2, , Now I am trying to upload file there using below code:
Dim filenamepath As String = System.IO.Path.Combine(Ser ver.MapPat h("~/Downl oadServer/ "), fuSheet.FileName)
fuSheet.PostedFile.SaveAs( filenamepa th)
But its not uploading file on \\192.168.1.1\Download location, Please help me to understand this.
Dim filenamepath As String = System.IO.Path.Combine(Ser
fuSheet.PostedFile.SaveAs(
But its not uploading file on \\192.168.1.1\Download location, Please help me to understand this.
ASKER
Can we create mapped drive using Asp.net, Problem with manual mapped drive is that if it get disconnected then Production upload, Download will fail.
Can we create mapped drive using Asp.net, Problem with manual mapped drive
for me, it would be not practical to do drive mapping via ASP.NET if that's possible.
the mapping of drive can be automated when the server is starting up. And we only need do it once for that.
ASKER
is that reliable method to map drive once?
ASKER
I did not understand concept of Virtual Directory on Website through IIS, what is use of that if it doesnt connect with defined server?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
in order to access to a directory at server: 192.168.1.2, I would suggest you create a mapped drive which you have been granted read/write access by IIS_IUSRS, for example. And then finally, refer to that mapped drive to save your uploaded file.