Service account vs app pool ID in IIS

I have a dashboard running in IIS. The endpoints are running as the IIS service account rather than as the application pool ID.

Is this a bug, a misconfiguration on my part, or working as designed?

Thanks,
Tim Curwick

Good question. I never noticed this before. UD isn’t doing anything particularly novel with IIS configuration. More of it is accomplished with configuration to the ASP.NET Core Module. https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-2.2

There is likely some configuration that (likely via web.config) or something in IIS.

I was wrong. A made a bad assumption. But it’s weird.

It is running as the configured app pool ID, as expected.

But $Env:UserName and $Env:UserDomain are set to the server’s AD computer account, $Env:UserProfile is set for the SYSTEM account (which is the IIS service account at the moment), and $Env:PSModulePath has a bad path where the user-specific path normally goes.

I’ll work around it, but that’s weird.

Thanks,
Tim Curwick