I have an HttpPostedFile object, when i try saving it via SaveAs i get this exception System.Web.HttpException
"The SaveAs method is configured to require a rooted path, and the path './tempUpload/4' is not rooted."
Why? how do i correct it?
I have an HttpPostedFile object, when i try saving it via SaveAs i get this exception System.Web.HttpException
"The SaveAs method is configured to require a rooted path, and the path './tempUpload/4' is not rooted."
Why? how do i correct it?
ASP.NET doesn't like the dot in your path. Try 'tempUpload/4' instead.
The path should be an absolute path, not a relative url.
Use the Server.MapPath
method to get the absolute path from your relative url.