File Upload Error

Discussion in 'ASP.NET / ASP.NET Core' started by rrvolk17306, Nov 27, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. When I try to upload a file I get the following error:

    System.IO.DirectoryNotFoundException: Could not find a part of the path "c:\htdocs\glc\gadmin\upl\auhtors1.txt". at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at glc.newsletter_upload.Button1_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\glc\gadmin\newsletter_upload.aspx.vb:line 74





    What is the valid upload path to use for my site?





    Dim m_strFolderName As String = "\htdocs\glc\gadmin\upl\"


    ...


    m_objFile.SaveAs(m_strFolderName & m_strFileName)
     
  2. Takeshi Eto

    Takeshi Eto DiscountASP.NET Staff

    You can find the full server path to your account in the Account Information section of your control panel.

    DiscountASP.NET
    http://www.DiscountASP.NET
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    Try this

    Dim m_strFolderName As String = server.mappath('\glc\gadmin\upl')

    Bruce

    DiscountASP.NET
    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