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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:02:32+00:00 2026-05-10T16:02:32+00:00

How can I have a relative path in the web.config file. This value is

  • 0

How can I have a relative path in the web.config file. This value is not in the connection string so I cannot use |DataDirectory| (I think), so what can I do?

  • 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. 2026-05-10T16:02:32+00:00Added an answer on May 10, 2026 at 4:02 pm

    What is the relative path for?

    Are you talking about a physical directory path or a url path?

    Edit:

    I needed to do something similar for one of my projects. I needed to locate a config file that was stored in a certain folder. While the web.config file itself does not provide anything special for this, you can take a path from the web.config file and convert it to an app-relative path.

    Request.ApplicationPath gets you the base directory of the web application. YOu can append the relative path to this and give it to whatever needs it.

    Also see this blog post by Rick Strahl for other interesting directories that may help you.

    You could then append the relatvie path to

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

Sidebar

Related Questions

I have a relative path to another context on the same server I can't
I have downloaded and added this very simple, one file, php web file explorer
I found this question Can't use relative paths with areas in ASP.NET MVC 2
I have a bean which im trying to pass a relative path at web
Is it possible to use a relative path to an SQLite database file in
I have a root path which can be defined in a file that inside
Can you have tar travel to a certain direct and then tar files relative
I have a ImageView in my relative layout. How can I get all the
I have a scenario where combobox can have same string values. for exa combo
Using ASP.NET how can I convert a absolute path to a relative client path?

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.