Upload file to server - file path and permissions

Discussion in 'ASP.NET 2.0' started by drmark1, Apr 9, 2008.

  1. I have a script to enable website visitors to upload files to the server and this works fine when I debug it in VWD, however, I am unable to get the files to be saved when I work it through the discountasp server.

    I think this is either because:
    1) You need permissions to be able to save files to the server - if so, is there a way I can set these or
    2) I have an incorrect path

    Currently I have tried:




    MyPath = "\web\selfreferco\htdocs\UploadedFiles\"


    MyPath = "\UploadedFiles\"


    MyPath = "E:\web\selfreferco\htdocs\UploadedFiles\"


    But no luck. Would really appreciate any help!


    Thanks and very best wishes....Mark
     
  2. I think all you need to do is change that to a virtual path instead of a physical path.


    For example, to get the Persits upload component to work I used this:
    Upload.SaveVirtual("\fileup\files")


    Worth trying anyway. [​IMG]
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    if you still have problem, pls post error and code snippet.


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page