I am publish the web application in intranet in my office using IIS 7.5. I used 'Async File Upload' control in a form. After the 'User' upload a image, the success message is show and the path also stored in the database & the 'image' is attached and send to the 'admin' by email as per my C# code. All are working fine but the image not seen anywhere in my system !!! I checked in my project folder and also checked the path of the project folder 'C:\inetpub\wwwroot\contractor\Upload\Commerical certificates'. Any one please help me to get the image in my system. (the image is available when i use the application in my standlone system).
protected void AFUCmpCertificate_UploadedComplete(
object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
try
{
if (AFU1.HasFile)
{
String fileExt = System.IO.Path.GetExtension(AFU1.FileName);
if (fileExt == ".pdf" || fileExt == ".jpg" || fileExt == ".gif"
|| fileExt == ".bmp" || fileExt == ".jpeg" || fileExt == ".png" || fileExt == ".tif")
{
if (AFU1.PostedFile.ContentLength < 2048000)
{
string filename = System.IO.Path.GetFileName(AFU1.FileName);
AFU1.SaveAs(Server.MapPath("~/Upload/Commerical Certificates/")
+ lblBasicVendorID.Text + filename);
lblCommStatus.Text = "File uploaded";
}
else
{
lblCommStatus.Text = "The file type not accepted or more than 2MB";
}
}
}
}
catch (Exception ex)
{
lblCommStatus.Text = "The file could not be upload.";
}
}
I am publish the web application in intranet in my office using IIS 7.5
I am assuming this means you have your app running on a web server somewhere in your office, i.e. Not your local machine. So, in order to find the file that was uploaded to the app, running on the web server, you need to look on the web server and not your local machine - yes?
I am new to IIS so I don't create the "Virtual Directory" for my website which is under "Sites". I right click my sitename and give "Alias" name, Physical path as "D:\Upload" to store the upload images by the End user in the web site.Now i know where the upload images are.