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. General Programming
  3. C#
  4. Shell Programming in Web Forms

Shell Programming in Web Forms

Scheduled Pinned Locked Moved C#
asp-netlinuxquestion
2 Posts 2 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.
  • T Offline
    T Offline
    TeraCoder
    wrote on last edited by
    #1

    Can you do shell type commands (ex. executing programs) in a web form?


    Me, wrong!?! Nah, you just need to change your thinking to make me right.

    H 1 Reply Last reply
    0
    • T TeraCoder

      Can you do shell type commands (ex. executing programs) in a web form?


      Me, wrong!?! Nah, you just need to change your thinking to make me right.

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Yes, using the same classes you would with a Windows Form: System.Diagnostics.Process. I (and thousands of other experienced developers) would warn you against this, however. Web servers are open to enough worms as is without providing a means to execute any command on the server. If you don't protect it well enough (and proper protection isn't as most people think), anyone could run any command on your server, such as extracting your server's SAM database (system and user accounts), copying it to a publicly accessible directory, downloading it, and running a brute-force cracker on it like l0pht crack. Then they become your computer's administrator. Much more is possible, especially in larger corporate networks. I advise against it. Also, this does not qualify as shell programming. Shell programming works with the UI to provide and consume services to and of the UI. This is simply process execution. If you are asking if you can bring up the "Browse for Folder" dialog on the web site, you can't do it in the server context (its a blocking call and no one can close the dialog) and on the client you would need a thick client application, but then you have security to deal with from the browser. Using ActiveX in this way is tricking and using .NET embedded user controls[^] is even trickier. If this is the case, just deploy a regular application to your clients.


      Reminiscent of my younger years... 10 LOAD "SCISSORS" 20 RUN

      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