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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:12:24+00:00 2026-05-19T03:12:24+00:00

I am trying to force my web application to run completely as the AppPool

  • 0

I am trying to force my web application to run completely as the AppPool User (Domain\UserForApp) and I correctly set the setting in IIS and everything runs fine and “System.Security.Principal.WindowsIdentity.GetCurrent().Name” returns the correct “Domain\UserForApp”.

However, when I tried to restrict the permissions of my web app directory to the bare bones needed:

  • SYSTEM (full Access)
  • Me (Full Access)
  • Admininstrators (Full Access)
  • UserForApp (Read)

I could no longer load any static files. So I downloaded Process Monitor to find out why and whenever it tries to access a static file, I get the following error:

ACCESS DENIED:
Desired Access:     Generic Read
Disposition:        Open
Options:            Sequential Access, No Buffering
Attributes:         RE
ShareMode:          Read, Write, Delete
AllocationSize:     n/a
Impersonating:      NT AUTHORITY\IUSR

And as you see from the above IUSR doesn’t have permissions so that is correct, but I just don’t understand why its trying to impersonate anyway. In my web.config file I have:

<location path="" overrideMode="Deny">
    <system.web>
        <identity impersonate="false" />
    </system.web>
</location>

just to ensure that no one turns on impersonation, but it had no effect.

It doesn’t work in both Classic and Pipelined mode, but the error is slightly different. In classic when viewing the images it just shows a HTTP Error 401.3 - Unauthorized page, and when using Pipelined it redirects to the login site.

  • 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-19T03:12:25+00:00Added an answer on May 19, 2026 at 3:12 am

    If you wan’t the site to run as the app pool’s identity then you need:

    <location path="my_site">
         <system.webServer>
             <security>
                 <authentication>
                     <anonymousAuthentication userName="" />
                 </authentication>
             </security>
        </system.webServer>
    </location>
    

    You can set this in your applicationHost.config file (probably the best place) by doing:

    APPCMD.exe set config "my_site" -section:system.webServer/security/authentication/anonymousAuthentication /username:"" /commit:apphost
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to force user to enter username and password when they run
I have a stupid WinCE application where I'm just trying to force an exception
I am trying to get my rails application running on my web server, but
I'm building a Web application with Java. Trying to integrate Spring Web MVC 3.0
I'm trying to create a web page that will display an appropriate user control
I am trying to figure out how to get a Dashcode web application to
I've been trying to make a JavaScript function for a Google Chrome web-application that
Hi I am trying to scrape other people web pages (for the forces of
I'm trying to force Safari or IE7 to open a new page using a
I'm trying to force an inherited class to use a custom attribute. I'm creating

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.