Hi all,
I am very happpy to return back again to you.
This time i have a critical problem about uploading files on the server by asp.net.
I choosed the HTML control "File" and Make it run as server control , and got its file name by the statement
string fname=File1.PostedFile.FileName
then i want to save it on the server Hard Disk so i used the statement :
try
{
File1.PostedFile.SaveAs(Server.MapPath("Project\\"+ff));
}
catch
{
Directory.CreateDirectory(Server.MapPath("Project\\"+ff));
File1.PostedFile.SaveAs(Server.MapPath("Project\\"+ff));
}
When running the page the following exception occured
Access to the path "c:\inetpub\wwwroot\Cubicle\Project\MyFile.doc" is denied.
which "c:\inetpub\wwwroot\Cubicle\" is my project directory (my project name is Cubicle)
Note : i configured the IIS options to be write ,read, and Directory browsing . and the problem is still exist .
Can any one help me ?
Thank You.