You must Sign In to post a response.
  • Category: .NET

    FileUpload Control 'C:/Uploads/' is a physical path, but a virtual path was expected.

    Afternoon Everyone

    I am getting this type of error

    'C:/Uploads/' is a physical path, but a virtual path was expected.

    C:/Uploads/ if the folder I am trying to save file to.

    Is working fine on my local machine, but as soon as I am trying to deploy to the server, that's when I am getting this error

    Thanx in advanced
  • #770100
    Hi Samuel,
    You can use
    Server.MapPath(@"~/App_Data/UploadFiles/")
    Also make sure the system is able to access the path you provide.
    Hope it will help.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com


  • Sign In to post your comments