add key="profilePicturesFolder"

Discussion in 'ASP.NET / ASP.NET Core' started by stephane, Oct 8, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi all
    I'm new on this forum
    Well i have a headache her I try to figure out
    my website is a video streaming website and I allow users to create their profile and upload their profile pictures to the server
    i have a dedicated folder on the server for that
    I set the folder path in the web.config as follow: <add key="profilePicturesFolder" value="~\\assets\\profile_pictures"/>
    and I use it in the code to get the path of that directory. string profilePicturesPath = HttpContext.Current.Server.MapPath(CConfig.GetProfilePhotosPath());
    So far so good. Now to get the pictures of the users I use the asp.net file upload control.
    So When I use the saveAs method of that upload control : photoUpload.PostedFile.SaveAs(profilePicturesPath + "//" + newFileName);
    it works fine on my localhost, but sadly does not work on the server.

    I really don't understand and Im kinda stuck here, I really need some help gyus

    Thanks so lot. In fact this is the url of that page http://www.abidjan4life.net/register.aspx

    Post Edited By Moderator (mjp [DASP]) : 10/18/2007 7:51:39 PM GMT
     
  2. Bruce

    Bruce DiscountASP.NET Staff

  3. Thank you for replying Bruce
    I finally resolved the issue, there was nothing wrong with my code or the server, it was just that the refresh functionality of fireftp ( the ftp client plugin for firefox) wasn't refreshing properly.
    When I rebooted my machine I found all the files I attempted to upload already on the server.
    Thank you Bruce
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page