unable to run a batch file from client in asp.net
-
Respected Gurus I have to run a batch file in a web application(ASP.net).I am using the following code on click of a web control button. Try System.Diagnostics.Process.Start(Server.MapPath("Imports\DumpPrmaster.bat")) Catch ex As Exception lblError.Text = ex.Message End Try Problem is that i can run this batch file while being on the server.But not from the client machine. How can i run this batch file stored in the Imports folder of my project from the client. dtsrun /SserverIP /Uajay /PPassword /NDTS_Name is the code inside my batch file. Thanks Ajay
-
Respected Gurus I have to run a batch file in a web application(ASP.net).I am using the following code on click of a web control button. Try System.Diagnostics.Process.Start(Server.MapPath("Imports\DumpPrmaster.bat")) Catch ex As Exception lblError.Text = ex.Message End Try Problem is that i can run this batch file while being on the server.But not from the client machine. How can i run this batch file stored in the Imports folder of my project from the client. dtsrun /SserverIP /Uajay /PPassword /NDTS_Name is the code inside my batch file. Thanks Ajay
MissionSuccess wrote:
But not from the client machine.
Are you trying to run this file on client machine ?
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
Respected Gurus I have to run a batch file in a web application(ASP.net).I am using the following code on click of a web control button. Try System.Diagnostics.Process.Start(Server.MapPath("Imports\DumpPrmaster.bat")) Catch ex As Exception lblError.Text = ex.Message End Try Problem is that i can run this batch file while being on the server.But not from the client machine. How can i run this batch file stored in the Imports folder of my project from the client. dtsrun /SserverIP /Uajay /PPassword /NDTS_Name is the code inside my batch file. Thanks Ajay
-
MissionSuccess wrote:
But not from the client machine.
Are you trying to run this file on client machine ?
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
Exactly I want to run the batch file stored on the server being on a client.
-
Respected Gurus I have to run a batch file in a web application(ASP.net).I am using the following code on click of a web control button. Try System.Diagnostics.Process.Start(Server.MapPath("Imports\DumpPrmaster.bat")) Catch ex As Exception lblError.Text = ex.Message End Try Problem is that i can run this batch file while being on the server.But not from the client machine. How can i run this batch file stored in the Imports folder of my project from the client. dtsrun /SserverIP /Uajay /PPassword /NDTS_Name is the code inside my batch file. Thanks Ajay
-
Exactly I want to run the batch file stored on the server being on a client.
MissionSuccess wrote:
I want to run the batch file stored on the server being on a client.
It won't be possible since it's a security violation. You can't execute any scripts on client browser. If your client allows to install activex, you can create on that runs this batch file.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions