problem in uploading the posted file

Posted on 2009-05-01
Last Modified: 2013-11-08

I am using following code to upload the file on the server(see code in code section).

But I am getting an error. "Part of path not found"

Am I missing something
string filename = System.IO.Path.GetFileName(selectvideos.PostedFile.FileName);


        selectvideos.PostedFile.SaveAs(HttpContext.Current.Server.MapPath("shows") + @"\" + filename);

Open in new window

Question by:KaranGupta
    LVL 4

    Accepted Solution

    just make sure you added the folder 'shows' in the main root of the website

    Author Comment

    it is present in the root of the website
    LVL 4

    Expert Comment

    actually i run your code and its working fine; maybe there is some configurations you should make in IIS

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
    It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now