Click here to Skip to main content
15,996,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to make work system.diagnostics process.start after publish a website?
Posted

You can't.

As I said two hours ago: That will open notepad at the server, not the client. You cannot run programs on client machines, that is what virus scanners and firewalls are there to prevent.

If you need to show a text file to your user, then you will have to open a page of your own and display the text file content in that.
 
Share this answer
 
Comments
PALANI KUMAR.A 11-Feb-11 5:33am    
I tried to open in server only, is it also have security issues do you mean that. (Note : This is working fine before publish the website)
Sergey Alexandrovich Kryukov 11-Feb-11 17:16pm    
A 5. Funny question :-)
--SA
As mentioned by OriginalGriff in this thread[^], what you are trying to do will cause the text file to open on the server (if allowed) in notepad.

This won't be visible by you, how could it be?

You say 'This is working fine before publish the website', but think about it. Before publish, it's running on your machine so when you start the process it's visible to you. After publish, its running on a remote machine!

Instead, what you need to do is read the input from the text file, then display it on a page in your site
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 11-Feb-11 17:16pm    
Correct, my 5. Big confusion OP must have... :-)
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900