Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. unable to run a batch file from client in asp.net

unable to run a batch file from client in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadminhelpquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MissionSuccess
    wrote on last edited by
    #1

    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

    N M J 3 Replies Last reply
    0
    • M MissionSuccess

      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

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      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

      M 1 Reply Last reply
      0
      • M MissionSuccess

        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

        M Offline
        M Offline
        M LN Rao
        wrote on last edited by
        #3

        Give execute permission to aspnet login for web application

        Intelligence is measured by common sense not by how many scholarly books you read.

        1 Reply Last reply
        0
        • N N a v a n e e t h

          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

          M Offline
          M Offline
          MissionSuccess
          wrote on last edited by
          #4

          Exactly I want to run the batch file stored on the server being on a client.

          N 1 Reply Last reply
          0
          • M MissionSuccess

            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

            J Offline
            J Offline
            John ph
            wrote on last edited by
            #5

            you can create an Activex control that run's the batch file, embed it in the aspx page, while loading the page; prompt a message and convince the user to install it on the machine.

            Regards
             - J O H N -


            1 Reply Last reply
            0
            • M MissionSuccess

              Exactly I want to run the batch file stored on the server being on a client.

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups