([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator);
17:11:52.245 [DBG] LaunchApp. Local endpoint: http://localhost:80. Client application URI: someclient://run-service?session-id=****
17:11:52.330 [DBG] PowerShellInvocationStateChanged. State: Running
17:11:52.941 [DBG] PowerShellInvocationStateChanged. State: Completed
17:11:52.948 [DBG] PowerShellInvocationStateChanged. State: Running
17:11:53.163 [DBG] PowerShellInvocationStateChanged. State: Completed
17:11:53.164 [INF] LaunchApp. PowerShell: IsAdministrator == True
string clientCommandLineArgs = "someclient://run-service?session-id=****";
The для конкретного приложения permission settings do not grant Локально Активация permission for the COM Server application with CLSID
{228*****-****-4226-A9E0-*********5A6}
and APPID
{2FD****-****-43EB-B888-**********5FD}
to the user DESKTOP-ZNI144\web-app-manager SID (S-1-5-22-2645718411-1038144242-3739008877-1010) from address LocalHost (с использованием LRPC) running in the application container Недоступно SID (Недоступно). This security permission can be modified using the Component Services administrative tool.
FileStream file = File.Open (GetFilePath (filename), FileMode.Open)
2021-05-31 14:00:18.774 +03:00 [DBG] OnPowerShell_InvocationStateChanged. State: Running, Reason (Exception): -
2021-05-31 14:00:19.967 +03:00 [DBG] OnPowerShell_InvocationStateChanged. State: Failed, Reason (Exception): System.Management.Automation.CmdletInvocationException: This command cannot be run due to the error: Отказано в доступе..
---> System.InvalidOperationException: This command cannot be run due to the error: Отказано в доступе..
at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
--- End of inner exception stack trace ---
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()