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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:11:57+00:00 2026-05-15T21:11:57+00:00

I have a virtual directory setup in IIS6. This maps to a shared network

  • 0

I have a virtual directory setup in IIS6. This maps to a shared network drive.

I can correctly map the path using

string mappedPath = HttpContext.Current.Server.MapPath(path);

I then create a DirectoryInfo object as I want to find some files in the directory.

DirectoryInfo updateDirectory = new DirectoryInfo(mappedPath);

But then updateDirectory.Exists is false?? I can take the string from the mappedPath and copy into Start->Run to get to the path so I know it exists. I am authenticating to the webservice using integrated windows authentication and have permissions to the necessary folders.

Is there something obvious I’m missing in the code? Or is this purely set-up and configuration of IIS etc.?

  • 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-15T21:11:58+00:00Added an answer on May 15, 2026 at 9:11 pm

    According to this link:

    http://bytes.com/topic/asp-net/answers/471616-server-mappath-virtual-directories

    Server.MapPath doesn’t give expected output when used against virtual directories.

    If it is server permissions and you are using Windows Authentication, make sure you have this in your config:

    <identity impersonate="true" /> 
    

    DirectoryInfo returns false on error conditions: if the folder isn’t there; you don’t have permissions; or it’s a disconnected network folder.

    Sounds like permissions of your ASP.NET worker process to me – the impersonation will solve this.

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

Sidebar

Ask A Question

Stats

  • Questions 490k
  • Answers 490k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In case you want to develop an extension module for… May 16, 2026 at 9:12 am
  • Editorial Team
    Editorial Team added an answer The site uses the sites framework. The example.com domain is… May 16, 2026 at 9:12 am
  • Editorial Team
    Editorial Team added an answer The documentation for incr() states: The return value is a… May 16, 2026 at 9:12 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am using IIS 6.0 and have a virtual directory setup. The server is
This is my first serious project using NHibernate and I have setup log4net to
I have an application where it was requested that a friendly url be made
As part of a CMS, I have created a custom VirtualPathProvider which is designed
I have been given the task of adding functionality to an existing IIS 6.0
We're having the same setup and receiving the same problem as: IIS 6 with
When I try to change the ASP.NET version to v4 on IIS 6, I
I'm developing a web application and I need to mix Forms & Windows authentication
I'm setting up an environment for testing a Silverlight app with RIA Services in

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.