Hi,
I am working with IIS 10 and I cannot add the user because the default application pool and other application pools cannot be found.
Batch file is not running on IIS?
Batch file is not ruuning on IIS
i m using window server r2 2012
I give full control accessibility but i don't what actually happens?
help me.
code:
string command = "c://PExecute.bat";
ProcessStartInfo procStartInfo = new ProcessStartInfo("cmd", "/q /c " + command);
procStartInfo.UseShellExecute = false;
procStartInfo.CreateNoWindow = true;
Process proc = new Process();
proc.StartInfo = procStartInfo;
proc.StartInfo.CreateNoWindow = true;
proc.Start();
Thanks in advance.
Windows for business | Windows Server | User experience | Other
Developer technologies | ASP.NET Core | Other
A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
2 answers
Sort by: Most helpful
-
Alvaro Ignacio Arancibia Prado 1 Reputation point
2021-05-11T19:13:12.317+00:00 -
Bruce Zhang-MSFT 3,776 Reputation points
2021-03-02T03:25:52.957+00:00 Hi @AnkiIt_wizard5 ,
To execute batch files through IIS, you need to grant sufficient permissions to the application pool.
If you use anonymous authentication on IIS, please edit it and check Application pool identity.
Then assign FullControl security permissions for the IIS AppPool\ApplicationPool. Because application pool is the user of current process. Process uses the identity of application to run batch file.
Find the directory where the batch file is located and go to the directory properties. In security tab, add the application pool, assign the FullControl permission.
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.
Best regards,
Bruce Zhang