For Programmers: Free Programming Magazines  


Home > Archive > C# > June 2006 > .net 2.0: ASP.NET 2.0 upload path, rooted path??









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author .net 2.0: ASP.NET 2.0 upload path, rooted path??
diDE

2005-08-22, 7:57 am

hi!
i'm using asp.net 2.0 (visual studio 2005 beta)
i got an error when i'm trying to save an uploaded file (web
application) to a folder of the web application.

UploadedFile.PostedFile.SaveAs (Path);

where Path = "..\\upload\12345\\filename.jpg"

Error Message:
The SaveAs method is configured to require a rooted path, and the path
'../upload/12345/filename.jpg' is not rooted

any ideas?

Robert Megee

2005-08-23, 7:57 am

On 22 Aug 2005 05:42:31 -0700, "diDE" <dez@chello.at> wrote:

>hi!
>i'm using asp.net 2.0 (visual studio 2005 beta)
>i got an error when i'm trying to save an uploaded file (web
>application) to a folder of the web application.
>
>UploadedFile.PostedFile.SaveAs (Path);
>
>where Path = "..\\upload\12345\\filename.jpg"

if this isn't a type shouldn't this have a double \\
between upload and 12345?

Q
azzamulkhair

2006-06-24, 11:21 pm

[QUOTE]Originally posted by diDE
[B]hi!
i'm using asp.net 2.0 (visual studio 2005 beta)
i got an error when i'm trying to save an uploaded file (web
application) In factI am trying to connect to FTP server using .Net but I can't do it. The application throws an error which is as follows:
The SaveAs method is configured to require a rooted path, and the path 'ftp://a:@192.168.0.245/FTP_Share/test.txt' is not rooted.

where FTP_Share is the root folder of the FTP server and test.txt is the file I am trying to upload
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com