Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Upload a file to different server with the web application server

    Hi All,

    I have problem with the upload the file to the diffrent server with the web application server. How to write the File1.PostedFile.SaveAs()????? to located to other server.

    IF the normal case for upload is to own server same with the web application the code is below
    //string FilePath="c:\\Inetpub\\wwwroot\\Nanya\\Upload\\";
    File1.PostedFile.SaveAs(FilePath+"KTCMA\\"+myFile);

    BUT for my case i want to upload my file to the server that not same as my web application that means my web application is at Server A but i want upload my file to Server B from Server A
    and i write the code below

    string FilePath="\\Server B\\C$\\Inetpub\\wwwroot\\Nanya\\Upload\\";
    File1.PostedFile.SaveAs(FilePath+"KTCMA\\"+myFile);

    and the error is "Cant find the part of C:\ServerB\C$\Inetpub\wwwroot\Nanya\Upload\"

    Any one can help me urgent??

  • #2
    New Coder
    Join Date
    Jan 2003
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you create a virtual directory in IIS that point to the location on the other mapped server/machine?

    I do something similar in a app I wrote where I store scanned images on a remote drive and I just created a virtual directory in my app that pointed to the location on the mapped drive.

    Works like a charm!

    Thanks,

    Thomas

  • #3
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    You can't do that

    Just ignore this post... sorry


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •