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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:53:38+00:00 2026-06-18T00:53:38+00:00

I am running IIS 7 on Windows Server 2008 R2 with PHP 5.4. One

  • 0

I am running IIS 7 on Windows Server 2008 R2 with PHP 5.4. One of my PHP scripts is trying to access a file on a protected network share using a UNC path. How can I change the IIS service account to an account that has permission to access the share? This is really easy to do on Apache HTTP server (you just change it), but it’s not clear how to do with IIS. What can I do?

Update:

I was able to get things working using the “Connect As” option in the “Basic Settings” of my website and then specifying an account that has access to the network share. It appears that my problem is related to this question:

https://serverfault.com/questions/366234/iis-identities-application-pool-vs-connect-as-in-basic-settings

  • 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-18T00:53:39+00:00Added an answer on June 18, 2026 at 12:53 am

    For IIS 7 running on Windows Server 2008 R2 … In the IIS Manager, select the Application Pool under which your Web Site is running.

    Click “Advanced Settings”. There will be an entry for Identity (it is under the Process Model section). Click it, provide credentials for your account that has permission to access the share.

    UPDATE

    You should make sure that if you are using an Active Directory Domain Account, you provided that correctly under Identity for the running App Pool. For example, MYDOMAIN\myAccount.

    After making this change, you will need to do the following:

    1. Stop the Web Site.
    2. Recycle your Application Pool.
    3. Start the Web Site.

    UPDATE II

    From the comment discussion on this answer, @HydroPowerDeveloper was able to get the PHP script to be able to access the network share via UNC path using WebSite -> Basic Settings -> “Connect As” and setting the credentials there.

    In the past, I have always used the approach of setting Identity via Application Pool and that has allowed my code to access Network shares via UNC path.

    However, all of the sites/applications I have deployed on IIS are .NET based WCF or ASPX sites.

    I would speculate (but am not 100% certain on this, would need research/testing to confirm) that the Identity specified in the Application Pool is used by executing .NET code, whereas the “Connect As” is used by the PHP script.

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

Sidebar

Related Questions

Windows 2008 R2 server running PHP 5.3. I have URL Rewrite for IIS working
I have a Windows 2008 server running IIS 7 and I'm trying to configure
I am running PHP 5.3.8 non-thread-safe version with IIS 7 on windows server 2008
I'm running IIS 7.5 on a Windows Server 2008 R2, and I'm trying to
I am running windows server with asp.net websites and sql server 2008 and IIS
So, we've got PHP 5.3.2 installed on a Windows 2008 R2 Server. PHP.ini file
I have couple web applications on my windows server 2008 r2. Running on IIS
I have a PHP app running on Windows 2008 server R2, which authenticates users
I'm running Windows Server 2008 R2 with IIS 7.5, AJP Connector 1.3, and Tomcat
We have an ASP.Net [MVC] web farm (Windows Server 2008 R2 running IIS). For

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.