Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9126571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:04:19+00:00 2026-06-17T07:04:19+00:00

I have following code that I am using to upload an image to my

  • 0

I have following code that I am using to upload an image to my website. The image is first uploaded to a temporary folder then it get resized after that the new image is uploaded to main image folder.

FileUpload1.SaveAs(Server.MapPath("~/TEMP/tmpimg.jpg"));
System.Drawing.Image originalImage = System.Drawing.Image.FromFile(Server.MapPath("~/TEMP/tmpimg.jpg"));
System.Drawing.Image MainImg = new SPCL().ResizeImage(originalImage, 700, 600, false);
MainImg.Save(Server.MapPath("~/Images/Home/Home1.jpg"));

This is giving following exception:

System.IO.FileNotFoundException: C:\site\wwwroot\TEMP\tmpimg.jpg at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement) at Settings.saveImages() at Settings.saveSettings()
at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement) at Settings.saveImages() at Settings.saveSettings()

I have set all the write permissions on the folder and even tried making all permissions enabled on all folders of the website (when I got irritated ;))

The error is coming at this line System.Drawing.Image.FromFile(Server.MapPath("~/TEMP/tmpimg.jpg"));

The file is not being created at the specified path.
Please any one have any idea why this is happening and how can I solve this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:04:20+00:00Added an answer on June 17, 2026 at 7:04 am

    Well I finally found the solution to the problem. And posting the answer in hope that it might solve someone else’s same problem in future.

    I solved this issue by removing the update panel that was enclosing the FileUpload Control.

    Also you can check this link update panel with file upload [Refered by: Shadow Wizard] for solving this problem without removing update panel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code that works without using throw however when I use
I am using Lazarus v0.9.30 (32 bit compiler). I have the following code that
I have the following block of jQuery code that I'm using to copy some
I have a combobox that is bound to an enum using the following code:
I'm using SDL with FASM, and have code that's minimally like the following: format
I have following code that does not work: I never get to goToFoodDetail .
I have the following code for file upload using grocery CRUD function test(){ $crud=new
I have the following html code to upload an image: <input type=file name=before size=40>
I have the following image upload code and controller. The hidden ID is POSTing
I am using the following code, upload.php, to try to have someone upload a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.