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. How to call exe from asp.net website page?

How to call exe from asp.net website page?

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadminhelptutorial
3 Posts 3 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.
  • R Offline
    R Offline
    Raheem MA
    wrote on last edited by
    #1

    Hi Friendz... I have a exe to be executed (Windows form to be opened) when user clicks on link button on asp.net page. I placed the exe on the server and given the path in web.config file. path is accessed in application from web.config file. I am using the following code to run the exe from asp.net: string path = for ex: "C:\X\pay.exe" Process.Start(path); This is working fine on my local machine. But after deploying the application on the server, it is not calling exe and not giving any exceptions/errors. I also placed the exe on the server. Please let me know if there is any way to get rid off this problem. Thank you, Raheem MA

    P J 2 Replies Last reply
    0
    • R Raheem MA

      Hi Friendz... I have a exe to be executed (Windows form to be opened) when user clicks on link button on asp.net page. I placed the exe on the server and given the path in web.config file. path is accessed in application from web.config file. I am using the following code to run the exe from asp.net: string path = for ex: "C:\X\pay.exe" Process.Start(path); This is working fine on my local machine. But after deploying the application on the server, it is not calling exe and not giving any exceptions/errors. I also placed the exe on the server. Please let me know if there is any way to get rid off this problem. Thank you, Raheem MA

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      It will try and run the exe on the server, 'cause it's server side code - not on the client...

      1 Reply Last reply
      0
      • R Raheem MA

        Hi Friendz... I have a exe to be executed (Windows form to be opened) when user clicks on link button on asp.net page. I placed the exe on the server and given the path in web.config file. path is accessed in application from web.config file. I am using the following code to run the exe from asp.net: string path = for ex: "C:\X\pay.exe" Process.Start(path); This is working fine on my local machine. But after deploying the application on the server, it is not calling exe and not giving any exceptions/errors. I also placed the exe on the server. Please let me know if there is any way to get rid off this problem. Thank you, Raheem MA

        J Offline
        J Offline
        J4amieC
        wrote on last edited by
        #3

        You're fundamentally lacking knowledge of how ASP.NET runs. All code in your code behind is run on the server. While you're developing your machine is essentially the server so the exe will run on your machine. When deployed to a web server, the exe will open on the server (assuming it had permission, which it usually wont in a live environment). Your only option is to allow the user to download the exe, and let them decide to run it. You, after all, cannot expect to dictate to the user what they should run from a webpage - imagine the security implications.

        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