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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:00:00+00:00 2026-05-28T05:00:00+00:00

I wrote a WCF service with a function that using absolute path to get

  • 0

I wrote a WCF service with a function that using absolute path to get directory on server.

it works well in debugging mode of VS2010 which triggers a temporary accessible service.

Then I deployed the service under IIS at this server. However, it told me that it cannot get this directory.

both VS2010 and IIS are in this same server. I am wondering if anything i need to add or modify on this dir path. I just think using absolute path should work…

that simple function is like following:

public void testDir() 
{
            string strPhotoRootPath = @"T:\Data\Image";

            if (!Directory.Exists(strPhotoRootPath))
            {
                ErrorMsg newError = new ErrorMsg();
                newError.errorCode = 1001;
                newError.errorDetails = "Cannot locate the photolog root directory";
                throw new WebFaultException<ErrorMsg>(newError, HttpStatusCode.Forbidden);
            }
            ... //rest codes
}

this T:\ drive is in another server, but is accessible from current machine.

wish I can get some advice here! thanks in advance!

  • 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-28T05:00:01+00:00Added an answer on May 28, 2026 at 5:00 am

    Use the UNC path instead of a mapped network drive, as the mapped drive is specific to your user account. Also, as KMan pointed out, make sure the application pool identity has access to the UNC path destination.

    EDIT based on comment:

    Here’s a resource on how to set the application pool identity using IIS6 on Win2003. Once you have the domain account correctly configured in IIS, and your application is up and running, then you’ll need to make sure the account you used has permissions to the share, as well as permissions on that file system.

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

Sidebar

Related Questions

I wrote a Client that will connect to my WCF service, and the service
I've got a WCF service running on a Windows 2003 Server, which I wrote
I wrote the most simple wcf service that have one method // return a+b
I have a simple web service I wrote using Webmatrix that returns data in
I wrote a WCF service that returns a string[][][][][] (necessary for legacy reasons). Then
I wrote a test WCF service that returns a string array as long as
I wrote a wcf service that uses BasicHttpBinding with some url and a client
I have a need to connect to a WCF service I wrote without having
In short: Trying to write a wcf service for a winform-app that invokes a
A few years ago I wrote a WCF service, which runs on a Windows

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.