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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:47:35+00:00 2026-05-23T01:47:35+00:00

I have IIS 7.0 installed on and there is a .net application with a

  • 0

I have IIS 7.0 installed on and there is a .net application with a .svc service there.

I would like to point a file in the virtual directory pointed by the application (please note that I converted my virtual dir in an application).

However, when I try to open a file, using a general api call in the .net-verse, and do not specify a root (complete) path but relative, I end up in the error when a resource is not found.

How can I obtain the physical path of my app?

Note that this is a web application. It cannot use the Request object because it needs to make this call from the web service, hosted by my app.

  • 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-05-23T01:47:35+00:00Added an answer on May 23, 2026 at 1:47 am

    try this might help to resolve your issue

    string apPath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
    

    or

    string apPath = System.Web.Hosting.HostingEnvironment.MapPath("~/folder/file");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed an ASP.NET 4.0 Web forms application in IIS 7.5. If I
I have IIS installed on a server configured with asp.net 2.0 and a directory
I have an ASP.NET 2.0 application (installed on IIS 6.0 from an MSI) which
I have a WiX install project that includes IIS setings for virtual directory and
I have an IIS with ASP.Net web service running, I need to upgrade it
I have an ASP.NET 2.0 application under IIS that has the functionnality of exporting
I have standard ASP.NET 4 application. Inside this application there are also few razor
I have IIS 5.1 installed on Windows XP Pro SP2. Besides I have installed
O/S: Windows 7 ,Home Premium I have just installed IIS manager Express from Web
I have XAMP 1.6.8 and IIS 5.0 installed on my PC(Windows XP SP3). I'm

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.