asp.net uploading image to server -


I am uploading an image to the server in an asp.net page. Here is the code.

Code : Protected Zero Button 2_Click1 (Object Sender, EventArgse E) {// Receimol = "~ / R / "+ File Upload 1.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 on runtime, it works successfully on local IIS, but when I publish my project is hosting on the server (remote server) is opening a web page in the browser, but when I click on the button 2 to add the client image (which is the client user selected from my computer), an error appears below.

  Runtime errors Description: An application error occurred on the server Current custom error settings for this application prevents applications from remotely seeing details of error (for security reasons). However, it can be seen by the browsers running on the local server machine. Description: To enable description of this specific error message for viewing on remote machines, please use a & lt; CustomErrors & gt; The tag within the "web .config" configuration file located in the root directory of the current web application is & lt; CustomArwers & gt; The tag should set its "mode" attribute to "off"    

As suggested in the error message, custom errors on your web.config Disable see what the problem is.

  & lt; Configuration & gt; & Lt; System.web & gt; & Lt; CustomArser's mode = "off" /> & Lt; /system.web> & Lt; / Configuration & gt;    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -