Re: starting an app from ASP.NET
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 01/17/05
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: Exchange Server"
- Previous message: Marcel Hug: "Re: Context menu by drop a file with right mouse button"
- In reply to: spmm#: "starting an app from ASP.NET"
- Next in thread: spmm#: "Re: starting an app from ASP.NET"
- Reply: spmm#: "Re: starting an app from ASP.NET"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 17 Jan 2005 10:15:33 -0500
Where do you want this to start? On the client or the server side?
Either way, the page is being rendered on the user's machine. The
ASPNET user is a local user on the server side which the page is being
rendered and performing operations under. When you open notepad in your
code through the Process class, it is running on the server, not on the
client side.
Now if this is what you want, then you should just do what you are
doing, and it will work. However, I STRONGLY suggest that in practice, you
don't elevate the ASPNET account to an administrator, as this is a huge
security hole. I would create another account with the rights to ONLY run
this executable, and then impersonate that account on the page that is
running the executable.
If you want to run the program on the client side, then none of this
applies, since you don't have rights (by default) to do that. You would
have to either embed an ActiveX control in the page, or a .NET control which
is given the rights to execute applications.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"spmm#" <spmm_pls@yahoo.com> wrote in message
news:%232e8WAK$EHA.2076@TK2MSFTNGP15.phx.gbl...
> Hi!
>
> Can someone explain how I can properly start (e.g.) notepad from an
> ASP.NET/C# page?? I've been googling for a day now, but no one seems to
> experience
> the same trouble as I do.
>
> I gave the ASPNET user administrator rights and followed these two
> articles
> from msdn:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;555134
> http://support.microsoft.com/default.aspx?scid=kb;en-us;317012
>
> After doing this I am able to start (e.g.) Notepad like this:
> Process.Start("notepad");
>
> I see a part of the title bar of the notepad window appearing and notepad
> also appears in the taskbar, but that's it. (I tried making a screenshot,
> but that appears to be impossible).
>
> Does anyone know how to solve this??
>
> Thanks.
>
>
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: Exchange Server"
- Previous message: Marcel Hug: "Re: Context menu by drop a file with right mouse button"
- In reply to: spmm#: "starting an app from ASP.NET"
- Next in thread: spmm#: "Re: starting an app from ASP.NET"
- Reply: spmm#: "Re: starting an app from ASP.NET"
- Messages sorted by: [ date ] [ thread ]