You can not process start a folder. Also as it’s a network share, the process must be running as a domain account with access to the share.
in asp.net c# Process.start not working after publish in IIS local host
code is
System.Diagnostics.Process.Start(@"\web1\");
Error is
Exception Details: System.ComponentModel.Win32Exception: Access is denied
Stack Trace:
[Win32Exception (0x80004005): Access is denied]
System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) +1091
System.Diagnostics.Process.Start(ProcessStartInfo startInfo) +60
_Default.Button1_Click(Object sender, EventArgs e) +22
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
I have tried application pool identity set as localservice and then
In IIS ADMIN Service enabled the allow service to interact with desktop
3 answers
Sort by: Most helpful
-
-
Sam Wu-MSFT 7,036 Reputation points Microsoft Vendor
2021-06-14T06:21:01.533+00:00 This is a problem caused by permissions, you can try the following methods to solve the problem.
In IIS Manage->Pool Application->Advance Setting->Identity change ApplicationPoolIdentity to Custom Account and set Administrator User.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
-
Paulo Viana 0 Reputation points
2024-04-02T17:06:48.7866667+00:00 Solution
In IIS Manage->Pool Application->Advance Setting->Identity change ApplicationPoolIdentity to Custom Account and set Administrator User.
Set user to access network