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 9260625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:56:25+00:00 2026-06-18T12:56:25+00:00

For school, my group has been tasked with continuing development of a Visual Studio

  • 0

For school, my group has been tasked with continuing development of a Visual Studio application. I don’t have too much experience with this, as I’ve only used Visual Basic a few times about 6 years ago.

One of the bugs that I have to fix deals with saving an image to a folder. When I run the “debug” mode of the code, it saves the image fine. However if I publish the website using Visual Studios, the page errors because it cannot find the folder. I cannot hard code the directory, I have to use a relative path.

This is my current code:

String path = Server.MapPath("~") + "sig/img.png"

This code also works on the debug mode, but not on the publish:

String path = Server.MapPath("/") + "sig/img.png"

When I try using either System.IO.Path.GetFullPath(path) or System.IO.Path.Combine(basePath, file), it returns a link that starts in ProgramFiles/MicrosoftVisualStudios/

I’m not sure it makes a difference, but all dev work is being done in C:\Users\UserName\program, and it’s being published to C:\inetpub\wwwdocs\program

Any help is appreciated.
(One thing that might help is being able to trace the variable “path”, but I don’t know how to do that once I publish.)

  • 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-18T12:56:26+00:00Added an answer on June 18, 2026 at 12:56 pm

    Credit goes to spender and WLin. Was a permission error that I overlooked.

    Thanks for the help everyone!

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

Sidebar

Related Questions

I have some troubles with my school project. I have a class: #include Group.h
I'm working on a school project in Visual studio 2010. I'm trying to make
I have a group project for school that I am working on. A member
I've manage a martial arts school's website, the schook also has a facebook group
I have Group and each group has contacts associated with it. When a user
I have been asked to research teaching a module in game development to beginners
I have information on school athletics, with tables for school, season, cashflow, and cashflow_group.
Our school's ERP has a nasty database structure to it and since it is
In school (high school), my partner and I are developing an Android tablet application.
At school we are busy making a Spotify application. I am currently making an

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.