Virtual Directory not seems to work on IIS website Asp.net

Feb 19 2020 11:59 PM
I have created Virtual Directory named as Downloadserver on my website IIS, My website IIS is set on 192.168.1.1 server while Virtual Directory I added having location \\192.168.2.2\Download , Now I am trying to upload file there using below code:
Dim filenamepath As String = System.IO.Path.Combine(Server.MapPath("~/DownloadServer/"), fuSheet.FileName)
fuSheet.PostedFile.SaveAs(filenamepath)
 
But its not uploading file on \\192.168.2.2\Download location, It seems to download that on same server where IIS is setup means 192.168.1.1, Is Virtual Directory worked that way? 

Answers (1)