Upload file to another directory of IIS RRS feed

  • Question

  • Hi dear friends,

    I am developing asp.net mvc web application in VS2008.In my project, users will upload their files.So that, we created a one folder and made virtual directory in IIS for it.That is just simple folder to store the files.But that folder path is not same with our application path and it is a separate folder.

    For eg : upload folder path is "http://localhost/uploadfolder" and our application path is "http://localhost/TestApplication

    I use Server.MapPath("~/uploadfolder") to get that upload virtual directory path but it returns like "http://localhost/TestApplication/uploadfolder" and I got error message "Upload directory not found". I also tried like Server.MapPath("http://localhost/uploadfolder") but still can't to upload. My question is how can I point to that path from my application? How can I upload the files? I haven't hosted yet my application in IIS and I run it from Visual Studio.Please guide me the right way.I really appreciate your answer.


    Best Regards,

    • Moved by Martin_Xie Wednesday, January 18, 2012 6:06 AM Redirect to ASP.Net Forum for better support. (From:Visual C# General)
    Wednesday, January 11, 2012 2:44 PM

All replies