I am trying to use Server.MapPath

Discussion in 'ASP.NET / ASP.NET Core' started by wengert, Sep 26, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am trying to use Server.MapPath to determine the real path to a directory (\lineups) in our site but when I use the code below I get the error:





    Could not find a part of the path "E:\web\westernband\htdocs\lineups\".





    The "\lineups" directory is right off our root page. My code (ASP.NET) is as follows:





    uploadedfile.PostedFile.SaveAs(Server.MapPath("\lineups\" &


    Session("newfilename")))





    This worked last year? Has something changed? How should I accomplish this?


    I suspect the "htdocs" is causing the problem? Not sure where that is coming from. My FTP program shows no such directory.




    Post Edited By Moderator (mjp) : 9/26/2006 11:15:10 PM GMT
     
  2. Htdocs is the actual home directory, so that shouldn't be a problem. Maybe your site's IUSR user doesn't have enough free disk space. Check the quota in the User/Quota Manager in the control panel.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. I think I've solved the problem. he file name thatI was generating was coming up null due to another problem. Once got a valid file name, it worked again.





    I still don't really understand the "htdocs" directory. I don't see it whenI use my FTP program (CuteFTP)?


    ------------
    Wayne
     
  4. Your ftp users home directory is set as htdocs, so you automatically appear in it.



    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
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