?
Solved

problem in uploading the posted file

Posted on 2009-05-01
3
Medium Priority
?
206 Views
Last Modified: 2013-11-08
Hi

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

0
Comment
Question by:KaranGupta
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
cauos earned 1500 total points
ID: 24285191
just make sure you added the folder 'shows' in the main root of the website
0
 

Author Comment

by:KaranGupta
ID: 24285199
it is present in the root of the website
0
 
LVL 4

Expert Comment

by:cauos
ID: 24285355
actually i run your code and its working fine; maybe there is some configurations you should make in IIS
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

850 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