By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,671 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,671 IT Pros & Developers. It's quick & easy.

Process.Start()

P: n/a
I can't get Process.Start() to work from a Web application.
Is this because of the security settings in the browser?
Since this is for a private network, security isn't an issue.
Anyone know how to make this work or is there another way?

I've tried:

Process proc = new Process();
proc.StartInfo.Startfile = "c:\\winnt\\notepad.exe";
proc.Start();

and the basic way:

Process.Start("c:\\winnt\\notepad.exe");

It will complain if it can't find the file and dosn't give
any error or result if it can.

any clues?

Thanks,

Robert Megee
Nov 16 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
since asp.net is a service account, it cannot start any UI windows.
even if you gave it all the rights in the world.

if you want to load a txt document, just push a text document through
the browser window and it should load whatever application is
associated on the user's machine to the .txt extension.. which should
usually be, notepad.exe

Nov 16 '05 #2

P: n/a
> since asp.net is a service account, it cannot start any UI windows.
even if you gave it all the rights in the world. That's not true at all. The code will work just fine on a development
machine and promptly fail on a webserver because a server has no user
interface piece. You should only try to run applications that have no user
interface pieces ideally. If you need to spark notepad on a client desktop,
you will need to build an activeX application - its a permissions thang!
--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------

"szeying.tan" <sz*********@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
if you want to load a txt document, just push a text document through
the browser window and it should load whatever application is
associated on the user's machine to the .txt extension.. which should
usually be, notepad.exe

Nov 16 '05 #3

P: n/a
sorry, i guess i was overexaggerating when i said "all the rights in
the world.."
you could change the asp.net user to run as a system account... but it
really goes against every bone in my body (there i go again..
overexaggerating ;))... the browser complains when you pop up an
activeX window too, doesn't it..?

Nov 16 '05 #4

P: n/a
I actually tried this with several different programs including a bat
file and an x-window emulator (exceed). They all failed.
I'll take a look at how to create an activeX app.
Since this is a on a private network with no outside connection,
security isn't really an issue so I've got some freedom there.

Thanks for the help.

Robert
On Tue, 8 Mar 2005 20:29:59 -0500, "Alvin Bruney [ASP.NET MVP]"
<www.lulu.com/owc> wrote:
since asp.net is a service account, it cannot start any UI windows.
even if you gave it all the rights in the world.

That's not true at all. The code will work just fine on a development
machine and promptly fail on a webserver because a server has no user
interface piece. You should only try to run applications that have no user
interface pieces ideally. If you need to spark notepad on a client desktop,
you will need to build an activeX application - its a permissions thang!


Nov 16 '05 #5

P: n/a
I understand having qualms over security. I've been in the unix world
for quite a while and realize the danger of running under root.
This is running on a private network with no outside connection so at
least I've got a bit of freedom to experiment.

Thanks for the info.

Robert
On 8 Mar 2005 18:09:33 -0800, "szeying.tan" <sz*********@gmail.com>
wrote:
sorry, i guess i was overexaggerating when i said "all the rights in
the world.."
you could change the asp.net user to run as a system account... but it
really goes against every bone in my body (there i go again..
overexaggerating ;))... the browser complains when you pop up an
activeX window too, doesn't it..?


Nov 16 '05 #6

P: n/a
"Robert Megee" <rm*****@comcast.net> wrote in message
news:0q********************************@4ax.com...
I actually tried this with several different programs including a bat
file and an x-window emulator (exceed). They all failed.
I'll take a look at how to create an activeX app.
Since this is a on a private network with no outside connection,
security isn't really an issue
<twitch> <twitch>

And is there the slightest possibility that it will ever be deployed on a
network that does have an outside connection? Have you also considered that
many hacking attacks are performed by disgruntled employees?
so I've got some freedom there.

Thanks for the help.

Robert
On Tue, 8 Mar 2005 20:29:59 -0500, "Alvin Bruney [ASP.NET MVP]"
<www.lulu.com/owc> wrote:
since asp.net is a service account, it cannot start any UI windows.
even if you gave it all the rights in the world.

That's not true at all. The code will work just fine on a development
machine and promptly fail on a webserver because a server has no user
interface piece. You should only try to run applications that have no user
interface pieces ideally. If you need to spark notepad on a client
desktop,
you will need to build an activeX application - its a permissions thang!

Nov 16 '05 #7

P: n/a
Just wondering, are you trying to start Notepad on the server (not quite
sure what that would do for you) or on the PC from where the connection to
the server is made?

Obviously, the server cannot start an application running on the client
machine.. all you get back from the server is HTML after all. And running
notepad on the client box kinda sounds like an IE exploit ;)

And if you want to start notepad on the server anyway, you need to change
the security permissions of the ASP.NET account (not a great idea, but it
works.. I'm running Excel on a webserver... it's a security nightmare I
know)

Regards
Stephan
Nov 16 '05 #8

P: n/a
I was just using notepad because I knew everyone would have a copy of
that. What I started out trying to run on the client was an X-window
emulator called exceed. I've got an ancient Oracle forms data
collection form that I can launch from a web page is exceed is
running. One of my co-workers needs it for a portal that he's
created. I will eventually re-write it like the other ancient
applications it's just not scheduled for a re-write at present. Too
many other things to do.

Robert
On Wed, 9 Mar 2005 11:13:18 +0100, "Stephan Steiner"
<st*****@isuisse.com> wrote:
Just wondering, are you trying to start Notepad on the server (not quite
sure what that would do for you) or on the PC from where the connection to
the server is made?

Obviously, the server cannot start an application running on the client
machine.. all you get back from the server is HTML after all. And running
notepad on the client box kinda sounds like an IE exploit ;)

And if you want to start notepad on the server anyway, you need to change
the security permissions of the ASP.NET account (not a great idea, but it
works.. I'm running Excel on a webserver... it's a security nightmare I
know)

Regards
Stephan


Nov 16 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.