Nested IIS Site not working

I’ve had good success using UD at the website root but I can’t for the life of me get it to work in a subfolder.

I’ve created a wwwroot\pud folder, placed my dashboard.ps1 file in there.

Edited my index.html base href and made it base href="/pud/"/

When I go to the localhost/pud folder I get a 502.5 error.

Looking in event viewer I see:

Application ‘MACHINE/WEBROOT/APPHOST/DEFAULT WEB SITE’ with physical root ‘C:\inetpub\wwwroot’ failed to start process with commandline ’ ', ErrorCode = ‘0x80070057’ : 0.

I’m a little puzzled why the command line is blank here, is that expected?

My web.config looks like this:

<aspNetCore processPath="C:\system32\WindowsPowerShell\v1.0\powershell.exe" arguments="C:\inetpub\wwwroot\pud\dashboard.ps1" stdoutLogEnabled="true" stdoutLogFile="C:\inetpub\logs\LogFiles\powershell\stdout" forwardWindowsAuthToken="true" />

Any ideas on what I am missing here?

Thanks,

@BenevolentD have you checked the sub folder permissions to make sure that the application pool ID has access to that folder?

yeah, it works fine when it is at the root and the subfolder is inheriting permissions from the root.

Just to be safe I double checked and confirmed the service account running the app pool has full control of the folder and ps1 file.

Thanks for the idea, let me know if you get any others.

@BenevolentD can you post a copy of your web.config file and what hosting bundle version you are using?

@BenevolentD i have tested your issue and found your problem
processPath=“C:\system32\WindowsPowerShell\v1.0\powershell.exe”
it should be

processPath=“C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe”

here is what need to be done ,
convert your ud in iis to application as below

image

place the dashboard and the web.config file in the ud folder as below

web.config code below

index.html code below

image

and it should be working…

Got it working - missing the “convert to application” step.

Thanks WSL - I don’t think that is in the documentation?