execute an exe from a webpage

Discussion in 'ASP .Net Web Services' started by César, May 22, 2007.

  1. César

    César Guest

    I have done an .exe and i like to run it from a web page
    How can I do it?

    From my own PC I have done this :


    Dim ie As IO.File
    Dim direccion As String =
    "C:\Inetpub\wwwroot\PruebaCesar1\Planta1Garaje\Garaje.exe"


    ie.Open(direccion, IO.FileMode.Open)


    but it close itself and appear another web that say:

    System.UnauthorizedAccessException: Acceso denegado a la ruta de acceso.

    ASP.NET no está autorizado para obtener acceso al recurso solicitado.
    Considere la posibilidad de conceder derechos de acceso al recurso para la
    identidad de solicitud de ASP.NET. Si la aplicación no se va a suplantar,
    ASP.NET utiliza una identidad de proceso base (normalmente {MACHINE}\ASPNET
    en IIS 5 o Network Service en IIS 6). Si la aplicación se va a suplantar
    mediante <identity impersonate="true"/>, la identidad será el usuario anónimo
    (generalmente IUSR_MACHINENAME) o el usuario solicitado autenticado.


    What can i do?
    What can i do to ask me like when it tell you if you want to download a file?



    I also try with this:

    Dim info As ProcessStartInfo = New
    ProcessStartInfo("C:\Inetpub\wwwroot\PruebaCesar1\Planta1Garaje\Garaje.exe")
    info.RedirectStandardOutput = True
    info.UseShellExecute = False

    System.Diagnostics.Process.Start(info)

    but the result is that a process called "Garaje" is created, but it do
    NOTHING, like it would not be created/run.


    Thanks


    --
    Gracias a todos por colaborar
     
    César, May 22, 2007
    #1
    1. Advertising

  2. César

    MattC Guest

    You need to look at the permissions that has been assigned to the ASPNET
    account on your machine. I don't think by default it is allowed to run
    EXE's. If you are running in anaoymous and using the IUSR_MACHINENAME then
    it defo wont beable to.

    MattC
    "César" <César@@discussions.microsoft.com> wrote in message
    news:...
    >I have done an .exe and i like to run it from a web page
    > How can I do it?
    >
    > From my own PC I have done this :
    >
    >
    > Dim ie As IO.File
    > Dim direccion As String =
    > "C:\Inetpub\wwwroot\PruebaCesar1\Planta1Garaje\Garaje.exe"
    >
    >
    > ie.Open(direccion, IO.FileMode.Open)
    >
    >
    > but it close itself and appear another web that say:
    >
    > System.UnauthorizedAccessException: Acceso denegado a la ruta de acceso.
    >
    > ASP.NET no está autorizado para obtener acceso al recurso solicitado.
    > Considere la posibilidad de conceder derechos de acceso al recurso para la
    > identidad de solicitud de ASP.NET. Si la aplicación no se va a suplantar,
    > ASP.NET utiliza una identidad de proceso base (normalmente
    > {MACHINE}\ASPNET
    > en IIS 5 o Network Service en IIS 6). Si la aplicación se va a suplantar
    > mediante <identity impersonate="true"/>, la identidad será el usuario
    > anónimo
    > (generalmente IUSR_MACHINENAME) o el usuario solicitado autenticado.
    >
    >
    > What can i do?
    > What can i do to ask me like when it tell you if you want to download a
    > file?
    >
    >
    >
    > I also try with this:
    >
    > Dim info As ProcessStartInfo = New
    > ProcessStartInfo("C:\Inetpub\wwwroot\PruebaCesar1\Planta1Garaje\Garaje.exe")
    > info.RedirectStandardOutput = True
    > info.UseShellExecute = False
    >
    > System.Diagnostics.Process.Start(info)
    >
    > but the result is that a process called "Garaje" is created, but it do
    > NOTHING, like it would not be created/run.
    >
    >
    > Thanks
    >
    >
    > --
    > Gracias a todos por colaborar
     
    MattC, May 24, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Bokma
    Replies:
    5
    Views:
    5,133
    John Bokma
    Sep 10, 2003
  2. Replies:
    1
    Views:
    432
  3. Paul
    Replies:
    14
    Views:
    856
    Alexey Smirnov
    Jun 19, 2008
  4. sifar
    Replies:
    5
    Views:
    430
  5. soren625
    Replies:
    2
    Views:
    380
    soren625
    Dec 12, 2006
Loading...

Share This Page