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

  • SEARCH
  • Home
  • 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 9227053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:58:32+00:00 2026-06-18T04:58:32+00:00

I am using microsoft visual studio and had created a solution file with 2

  • 0

I am using microsoft visual studio and had created a solution file with 2 projects inside.
Inside one of the aspx file in project A, I had a file upload control.

When the “upload” button is onclick, it would save the image I uploaded into a folder in Project A as well as a folder in Project B. I am only able to save the image into Project A folder using the below code.

FileUpload1.SaveAs(Server.MapPath("~/Images/" + filename));

But I am unable to save the images into Project B folder. with the code below, it had generate this error: ImagesFile is a folder inside Project B

FileUpload1.SaveAs(Server.MapPath("~/ImagesFile/" + filename));

Could not find a part of the path 'C:\Users\Desktop\DSC000015.JPG'.

Is there anyway that I had access the file path of another project???

  • 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-18T04:58:33+00:00Added an answer on June 18, 2026 at 4:58 am

    The problem here is Server.MapPath always gives you a path to inside your web directory. It will never be able to map a path outside your application.

    You have two ways to accomplish this task.

    1.Save a path in web.config file which should be an absolute path i.e. “c:\users\desktop\” and append the image name to this path.

    or

    2.You will have to create a page in project 2 which should accept images in post and save in a particular folder. So whenever an image is uploaded in project 1, it in turn, posts it to project 2 which ultimately saves it to a folder mapped inside its directory.

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

Sidebar

Related Questions

I want to deploy a Website which i have created using Microsoft Visual Studio
I want to deploy a Website which i have created using Microsoft Visual Studio
Using Microsoft Visual Studio 2010: Can I write this type of macro in C?
Using: Microsoft SQL Server 2008 Microsoft Visual Studio 2010 C# .NET 4.0 WinForms Ok
I am using Microsoft Visual Studio debugger to debug a remote application. These are
I'm trying to write a dll plugin for Winamp. I'm using Microsoft Visual Studio
I am using the Microsoft ARM Assembler v15.00.20720 (armasm.exe) that came with Visual Studio
Background info: I'm using Microsoft Visual C# 2010 for this project. I want to
I have created an OData/WCF service using Visual Studio 2010 on Windows XP SP3
I am new to using Microsoft development tools but have been using Visual Studio

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.