I've searched around here and found a couple of things to try but none of the other questions matches exactly what is happening with my IIS and application setup.
First, some background. A client of my company's wanted an internal application of theirs re-written bits at a time. I came into the project with no control over the initial IIS setup and there appear to be some funky things that aren't working correctly, but I'll get to that. The first bit is a custom label application that writes a file to a file share to be printed. In order to maintain parts of the legacy app that were needed, I created a separate site in IIS and moved all of the legacy label application code there. I also create a new sub-application under their default website. So the structure looks something like:
IIS
- Default Site
- New Labels app (currently exact same code base as the legacy app)
- Legacy Labels app
The default site is running under an app pool identity called ASP.NET v4.0, not DefaultAppPool and the new app is running under an app pool identity named after the site - Labels.
Problem
The sub-application for the new labels can write to the file share without any problems, but the legacy site is getting Access Denied. This is the exact same code base and the only difference between the two is the app pool that is being used. I want to maintain these app pools separately, but currently they are set up identically. So this leads me to believe that something was set up in IIS prior to me getting involved where the ASP.NET v4.0 app pool identity somehow magically has access to the file share whereas the newly created Labels account does not.
The fileshare is open to the Everyone group so there shouldn't be any issues from the domain level, but from what I understand these IIS accounts that get generated are part of the virtual IIS AppPool domain anyways. So, how is it possible that one app pool identity has access and one does not? What are some steps I can take in the troubleshooting process?