I am uploading image to the server in an asp.net page.Here is the code..
Code:
protected void Button2_Click1(object sender, EventArgs e)
{
//resimyolu = "~/r/" + FileUpload1.FileName;
FileUpload1.SaveAs(Server.MapPath("~/r/a.png"));
FileUpload1.SaveAs("d:/upresim/a.png");
Image1.ImageUrl = "~/r/a.png";
}
the 'r' folder is the image folder in my project.when I add a picture to the 'r' folder at runtime,it works succesfully on local IIS ,but when I publish my project and host it on a server(remote server) the web page is opening in the browser ,but when I click button2 to add client image(which client user selected from his computer) to the project an error appears like below..
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".