Closed claudiospizzi closed 4 years ago
Looks like this is a part of PowerShell itself. Seems to me it's a profile cache. I'm not sure if starting it with -NoProfile will work around this behavior.
This worked for me.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->
<system.webServer>
<security>
<!-- <requestFiltering removeServerHeader ="true" /> -->
</security>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="powershell.exe" arguments="-NoProfile -File .\dashboard.ps1" stdoutLogEnabled="true" stdoutLogFile="C:\Users\iis\AppData\Local\Logs\log.txt" forwardWindowsAuthToken="true" />
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
Describe the Issue
I'm not sure why, but Universal Automation hosted in IIS tries to write into the C:\ root to write some startup profile data. In my case, the IIS user doesn't have the permissions to write into that folder:
C:\Microsoft\Windows\PowerShell\StartupProfileData-NonInteractive
To Reproduce
Hosted in IIS:
Expected behavior
Not sure where this comes from. Would be great if this is redirected either to the users app data or the global
C:\ProgramData
.Screenshots
Version Information